Changeset 2640 for trunk/sources
- Timestamp:
- 01/18/10 16:46:24 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ScalingTreeEvaluator.cs
r2634 r2640 36 36 public class ScalingTreeEvaluator : HL3TreeEvaluator, ITreeEvaluator { 37 37 public ScalingTreeEvaluator() : base() { } // for persistence 38 public ScalingTreeEvaluator(double minValue, double maxValue) : base(minValue, maxValue) { } 38 public ScalingTreeEvaluator(double minValue, double maxValue) 39 : base(minValue, maxValue) { 40 } 39 41 40 42 private string targetVariable; … … 42 44 get { return targetVariable; } 43 45 set { targetVariable = value; } 46 } 47 48 49 public override double Evaluate(int sampleIndex) { 50 PC = 0; 51 this.sampleIndex = sampleIndex; 52 double estimation = EvaluateBakedCode(); 53 if (double.IsPositiveInfinity(estimation)) estimation = UpperEvaluationLimit; 54 else if (double.IsNegativeInfinity(estimation)) estimation = LowerEvaluationLimit; 55 else if (double.IsNaN(estimation)) estimation = UpperEvaluationLimit; 56 return estimation; 44 57 } 45 58
Note: See TracChangeset
for help on using the changeset viewer.