Free cookie consent management tool by TermsFeed Policy Generator

Changeset 441 for trunk


Ignore:
Timestamp:
08/04/08 23:04:13 (16 years ago)
Author:
gkronber
Message:

changed the way invalid trees are handled in the RampedTreeCreator (ticket #225)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/RampedTreeCreator.cs

    r324 r441  
    2727using HeuristicLab.Random;
    2828using HeuristicLab.Functions;
     29using System.Diagnostics;
    2930
    3031namespace HeuristicLab.StructureIdentification {
     
    7071      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TreeHeight"), new IntData(actualTreeHeight)));
    7172
    72       if(!gardener.IsValidTree(root)) { throw new InvalidProgramException(); }
    73 
    74       if(actualTreeHeight > maxTreeHeight) {
    75         throw new InvalidProgramException();
    76       }
     73      Debug.Assert(gardener.IsValidTree(root) && actualTreeHeight <= maxTreeHeight);
    7774
    7875      return gardener.CreateInitializationOperation(gardener.GetAllSubTrees(root), scope);
Note: See TracChangeset for help on using the changeset viewer.