Changeset 7183 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs
- Timestamp:
- 12/13/11 13:52:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs
r7154 r7183 39 39 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 40 40 } 41 [Storable(DefaultValue = double.MinValue)] 42 private double lowerEstimationLimit; 43 [Storable(DefaultValue = double.MaxValue)] 44 private double upperEstimationLimit; 41 45 42 46 #region properties … … 72 76 this.targetVariables = new string[original.targetVariables.Length]; 73 77 Array.Copy(original.targetVariables, this.targetVariables, this.targetVariables.Length); 74 } 75 public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, IEnumerable<string> targetVariables) 78 this.lowerEstimationLimit = original.lowerEstimationLimit; 79 this.upperEstimationLimit = original.upperEstimationLimit; 80 } 81 public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, IEnumerable<string> targetVariables, double lowerLimit = double.MinValue, double upperLimit = double.MaxValue) 76 82 : base() { 77 83 this.name = ItemName; … … 79 85 this.symbolicExpressionTree = tree; 80 86 this.interpreter = interpreter; this.targetVariables = targetVariables.ToArray(); 87 this.lowerEstimationLimit = lowerLimit; 88 this.upperEstimationLimit = upperLimit; 81 89 } 82 90 … … 95 103 for (int c = 0; c < components.Length; c++) { 96 104 enumerator.MoveNext(); 97 components[c] = enumerator.Current;105 components[c] = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, enumerator.Current)); 98 106 } 99 107 l.Add(components);
Note: See TracChangeset
for help on using the changeset viewer.