Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/09 14:26:29 (15 years ago)
Author:
mkommend
Message:

added FunctionTreeIterator to HeuristicLab.GP.Interfaces (ticket #749)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/TreeEvaluatorBase.cs

    r2328 r2364  
    6464      codeArr = new Instr[functionTree.GetSize()];
    6565      int i = 0;
    66       foreach (IFunctionTree tree in IteratePrefix(functionTree)) {
     66      foreach (IFunctionTree tree in FunctionTreeIterator.IteratePrefix(functionTree)) {
    6767        codeArr[i++] = TranslateToInstr(tree);
    6868      }
    69     }
    70 
    71     private IEnumerable<IFunctionTree> IteratePrefix(IFunctionTree functionTree) {
    72       List<IFunctionTree> prefixForm = new List<IFunctionTree>();
    73       prefixForm.Add(functionTree);
    74       foreach (IFunctionTree subTree in functionTree.SubTrees) {
    75         prefixForm.AddRange(IteratePrefix(subTree));
    76       }
    77       return prefixForm;
    7869    }
    7970
Note: See TracChangeset for help on using the changeset viewer.