Changeset 483
- Timestamp:
- 08/10/08 14:24:30 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs
r396 r483 270 270 } 271 271 272 public IEvaluator CreateEvaluator( Dataset dataset) {273 return new BakedTreeEvaluator( dataset);272 public IEvaluator CreateEvaluator() { 273 return new BakedTreeEvaluator(); 274 274 } 275 275 -
trunk/sources/HeuristicLab.Functions/BakedTreeEvaluator.cs
r477 r483 48 48 49 49 50 public BakedTreeEvaluator(Dataset dataset) { 51 this.dataset = dataset; 50 public BakedTreeEvaluator() { 52 51 codeArr = new Instr[MAX_TREE_SIZE]; 53 52 for(int i = 0; i < MAX_TREE_SIZE; i++) { … … 56 55 } 57 56 58 public void ResetEvaluator(IFunctionTree functionTree) { 57 public void ResetEvaluator(IFunctionTree functionTree, Dataset dataset) { 58 this.dataset = dataset; 59 59 List<LightWeightFunction> linearRepresentation = ((BakedFunctionTree)functionTree).LinearRepresentation; 60 60 int i = 0; -
trunk/sources/HeuristicLab.Functions/IEvaluator.cs
r396 r483 3 3 using System.Linq; 4 4 using System.Text; 5 using HeuristicLab.DataAnalysis; 5 6 6 7 namespace HeuristicLab.Functions { 7 8 public interface IEvaluator { 8 void ResetEvaluator(IFunctionTree functionTree );9 void ResetEvaluator(IFunctionTree functionTree, Dataset dataset); 9 10 double Evaluate(int sampleIndex); 10 11 } -
trunk/sources/HeuristicLab.Functions/IFunctionTree.cs
r396 r483 40 40 void RemoveSubTree(int index); 41 41 42 IEvaluator CreateEvaluator( Dataset dataset);42 IEvaluator CreateEvaluator(); 43 43 } 44 44 } -
trunk/sources/HeuristicLab.StructureIdentification/Evaluation/GPEvaluatorBase.cs
r482 r483 87 87 88 88 // initialize and reset the evaluator 89 if(evaluator == null) evaluator = functionTree.CreateEvaluator( dataset);90 evaluator.ResetEvaluator(functionTree );89 if(evaluator == null) evaluator = functionTree.CreateEvaluator(); 90 evaluator.ResetEvaluator(functionTree, dataset); 91 91 evaluatedSamples = 0; 92 92 … … 97 97 // update the value of total evaluated nodes 98 98 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * evaluatedSamples; 99 // write the calculate quality value100 99 return null; 101 100 }
Note: See TracChangeset
for help on using the changeset viewer.