Changeset 365 for trunk/sources/HeuristicLab.Functions/FunctionView.cs
- Timestamp:
- 07/07/08 15:10:51 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Functions/FunctionView.cs
r308 r365 168 168 public void Visit(Cosinus cosinus) { 169 169 name = "Sin"; 170 } 171 172 public void Visit(Differential diff) { 173 string timeOffset = ""; 174 int sampleOffset = ((ConstrainedIntData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Differential.OFFSET).Value).Data; 175 int variableIndex = ((ConstrainedIntData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Differential.INDEX).Value).Data; 176 double weight = ((ConstrainedDoubleData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Differential.WEIGHT).Value).Data; 177 if(sampleOffset < 0) { 178 timeOffset = "(t" + sampleOffset + ")"; 179 } else if(sampleOffset > 0) { 180 timeOffset = "(t+" + sampleOffset + ")"; 181 } else { 182 timeOffset = ""; 183 } 184 name = "Diff" + variableIndex + timeOffset + " * " + weight; 170 185 } 171 186
Note: See TracChangeset
for help on using the changeset viewer.