- Timestamp:
- 10/19/18 13:35:52 (6 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r15583 r16244 161 161 OnChanged(); 162 162 } 163 164 protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {165 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");166 IRegressionProblemData regressionProblemData = problemData as IRegressionProblemData;167 if (regressionProblemData == null)168 throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");169 170 var returnValue = base.IsProblemDataCompatible(problemData, out errorMessage);171 return returnValue;172 }173 174 public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {175 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");176 RegressionProblemData regressionProblemData = problemData as RegressionProblemData;177 if (regressionProblemData == null)178 throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");179 180 base.AdjustProblemDataProperties(problemData);181 }182 163 } 183 164 } -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
r15583 r16244 70 70 public new IRegressionProblemData ProblemData { 71 71 get { return (IRegressionProblemData)base.ProblemData; } 72 set { base.ProblemData = value; } 72 set { 73 if (value == null) throw new ArgumentNullException("The problemData must not be null."); 74 string errorMessage = string.Empty; 75 if (!Model.IsProblemDataCompatible(value, out errorMessage)) throw new ArgumentException(errorMessage); 76 77 base.ProblemData = value; 78 } 73 79 } 74 80
Note: See TracChangeset
for help on using the changeset viewer.