- Timestamp:
- 08/05/08 16:38:38 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs
r450 r451 282 282 283 283 internal bool IsValidTree(IFunctionTree tree) { 284 SubOperatorsConstraintAnalyser analyzer = new SubOperatorsConstraintAnalyser(); 285 analyzer.AllPossibleOperators = AllFunctions.Cast<IOperator>().ToArray<IOperator>(); 286 for(int i = 0; i < tree.SubTrees.Count; i++) { 287 if(!analyzer.GetAllowedOperators(tree.Function, i).Contains(tree.SubTrees[i].Function)) return false; 288 } 289 284 290 foreach(IConstraint constraint in tree.Function.Constraints) { 285 291 if(constraint is NumberOfSubOperatorsConstraint) {
Note: See TracChangeset
for help on using the changeset viewer.