Changeset 1069
- Timestamp:
- 12/25/08 13:51:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/BakedTreeEvaluator.cs
r773 r1069 162 162 case EvaluatorSymbolTable.DIFFERENTIAL: { 163 163 int row = sampleIndex + currInstr.i_arg1; 164 if (row < 1 || row >= dataset.Rows) return double.NaN; 165 else return currInstr.d_arg0 * (dataset.GetValue(row, currInstr.i_arg0) - dataset.GetValue(row - 1, currInstr.i_arg0)); 164 if (row < 0 || row >= dataset.Rows) return double.NaN; 165 else if (row < 1) return 0.0; 166 else { 167 double prevValue = dataset.GetValue(row - 1, currInstr.i_arg0); 168 if (double.IsNaN(prevValue) || double.IsInfinity(prevValue)) return 0.0; 169 else return currInstr.d_arg0 * (dataset.GetValue(row, currInstr.i_arg0) - prevValue); 170 } 166 171 } 167 172 case EvaluatorSymbolTable.MULTIPLICATION: {
Note: See TracChangeset
for help on using the changeset viewer.