Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 11:22:28 (14 years ago)
Author:
mkommend
Message:

#1411: Reverted changesets regarding the number of evaluated nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5864 r5906  
    4444    private const string EvaluationPartitionParameterName = "EvaluationPartition";
    4545    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    46     private const string EvaluatedNodesParameterName = "EvaluatedNodes";
    4746
    4847    public override bool CanChangeName { get { return false; } }
     
    5756    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
    5857      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    59     }
    60     public ILookupParameter<DoubleValue> EvaluatedNodesParameter {
    61       get { return (ILookupParameter<DoubleValue>)Parameters[EvaluatedNodesParameterName]; }
    6258    }
    6359    public IValueLookupParameter<T> ProblemDataParameter {
     
    8783      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
    8884      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
    89       Parameters.Add(new LookupParameter<DoubleValue>(EvaluatedNodesParameterName, "The total number of evaluated symbolic expression tree nodes."));
    9085      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
    9186      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
     
    107102        .Where(i => i < testPartitionStart || testPartitionEnd <= i);
    108103    }
    109 
    110     protected void AddEvaluatedNodes(double numberOfNodes) {
    111       if (EvaluatedNodesParameter.ActualValue == null) {
    112         // variable for evaluated nodes does not exist yet
    113         // search global scope
    114         var scope = ExecutionContext.Scope;
    115         while (scope.Parent != null) scope = scope.Parent;
    116         // add variable into global scope
    117         scope.Variables.Add(new HeuristicLab.Core.Variable(EvaluatedNodesParameter.ActualName, new DoubleValue()));
    118       }
    119       double curEvaluatedNodes = EvaluatedNodesParameter.ActualValue.Value;
    120       EvaluatedNodesParameter.ActualValue = new DoubleValue(curEvaluatedNodes + numberOfNodes);
    121     }
    122104  }
    123105}
Note: See TracChangeset for help on using the changeset viewer.