Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/31/10 08:31:29 (14 years ago)
Author:
gkronber
Message:

Removed fields for tree size and tree height in GeneticProgrammingModel instead iterate through the tree to determine the size/height whenever it is needed. #1025 (Incorrect size/height values for trees)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/sources/HeuristicLab.GP.Operators/3.3/Manipulation/CutOutNodeManipulation.cs

    r2222 r3873  
    8484        parent.InsertSubTree(childIndex, selectedChild);
    8585        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
    86         // recalculate the size and height of our tree
    87         gpModel.Size = gpModel.FunctionTree.GetSize();
    88         gpModel.Height = gpModel.FunctionTree.GetHeight();
    8986        // don't need to schedule initialization operations
    9087        return null;
     
    10198        parent.InsertSubTree(childIndex, newFunctionTree);
    10299        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
    103         // recalculate size and height
    104         gpModel.Size = gpModel.FunctionTree.GetSize();
    105         gpModel.Height = gpModel.FunctionTree.GetHeight();
    106100        // schedule an initialization operation for the new function-tree
    107101        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);
Note: See TracChangeset for help on using the changeset viewer.