Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 15:07:20 (13 years ago)
Author:
mkommend
Message:

#1418: Corrected ADFs and adapted unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/AllArchitectureAlteringOperatorsTest.cs

    r5759 r5792  
    3232  public class AllArchitectureAlteringOperatorsTest {
    3333    private const int POPULATION_SIZE = 1000;
    34     private const int N_ITERATIONS = 100;
     34    private const int N_ITERATIONS = 200;
    3535    private const int MAX_TREE_LENGTH = 100;
    3636    private const int MAX_TREE_DEPTH = 10;
     
    9999              par1 = (SymbolicExpressionTree)trees.SelectRandom(random).Clone();
    100100            } while (par0.Length > MAX_TREE_LENGTH || par1.Length > MAX_TREE_LENGTH);
    101             newTrees.Add(SubtreeCrossover.Cross(random, par0, par1, 0.9, MAX_TREE_LENGTH, MAX_TREE_DEPTH));
     101            var newTree = SubtreeCrossover.Cross(random, par0, par1, 0.9, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
     102            Util.IsValid(newTree);
     103            newTrees.Add(newTree);
    102104          }
    103105        }
    104         trees = newTrees;
     106        trees = new List<ISymbolicExpressionTree>(newTrees);
     107        newTrees.Clear();
    105108      }
    106109      var msPerOperation = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE / (double)N_ITERATIONS;
Note: See TracChangeset for help on using the changeset viewer.