Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/08 15:10:51 (16 years ago)
Author:
gkronber
Message:

implemented #195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/FunctionView.cs

    r308 r365  
    168168      public void Visit(Cosinus cosinus) {
    169169        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;
    170185      }
    171186
Note: See TracChangeset for help on using the changeset viewer.