Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12482


Ignore:
Timestamp:
06/19/15 15:10:55 (9 years ago)
Author:
mkommend
Message:

#2320: Fixed warnings in unit test solutions introduced in r12420 by marking methods as obsolete.

Location:
trunk/sources/HeuristicLab.Tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/AllArchitectureAlteringOperatorsTest.cs

    r12012 r12482  
    6161            // manipulate
    6262            stopwatch.Start();
    63             var selectedTree = (ISymbolicExpressionTree)trees.SelectRandom(random).Clone();
     63            var selectedTree = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
    6464            var oldTree = (ISymbolicExpressionTree)selectedTree.Clone();
    6565            bool success = false;
     
    8383            SymbolicExpressionTree par1 = null;
    8484            do {
    85               par0 = (SymbolicExpressionTree)trees.SelectRandom(random).Clone();
    86               par1 = (SymbolicExpressionTree)trees.SelectRandom(random).Clone();
     85              par0 = (SymbolicExpressionTree)trees.SampleRandom(random).Clone();
     86              par1 = (SymbolicExpressionTree)trees.SampleRandom(random).Clone();
    8787            } while (par0.Length > MAX_TREE_LENGTH || par1.Length > MAX_TREE_LENGTH);
    8888            var newTree = SubtreeCrossover.Cross(random, par0, par1, 0.9, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubtreeCrossoverTest.cs

    r12012 r12482  
    5050      for (int gCount = 0; gCount < generations; gCount++) {
    5151        for (int i = 0; i < POPULATION_SIZE; i++) {
    52           var par0 = (ISymbolicExpressionTree)trees.SelectRandom(random).Clone();
    53           var par1 = (ISymbolicExpressionTree)trees.SelectRandom(random).Clone();
     52          var par0 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
     53          var par1 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
    5454          SubtreeCrossover.Cross(random, par0, par1, 0.9, 100, 10);
    5555        }
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs

    r12012 r12482  
    125125      stopwatch.Start();
    126126      for (int i = 0; i != PopulationSize; ++i) {
    127         var parent0 = (ISymbolicExpressionTree)trees.SelectRandom(twister).Clone();
     127        var parent0 = (ISymbolicExpressionTree)trees.SampleRandom(twister).Clone();
    128128        var scopeParent0 = new Scope();
    129129        scopeParent0.Variables.Add(new Core.Variable(crossover.ParentsParameter.ActualName, parent0));
    130130        context.Scope.SubScopes.Add(scopeParent0);
    131131
    132         var parent1 = (ISymbolicExpressionTree)trees.SelectRandom(twister).Clone();
     132        var parent1 = (ISymbolicExpressionTree)trees.SampleRandom(twister).Clone();
    133133        var scopeParent1 = new Scope();
    134134        scopeParent1.Variables.Add(new Core.Variable(crossover.ParentsParameter.ActualName, parent1));
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs

    r12012 r12482  
    7979    public static double CalculateEvaluatedNodesPerSec(ISymbolicExpressionTree[] trees, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset dataset, int repetitions) {
    8080      // warm up
    81       IEnumerable<int> rows = Enumerable.Range(0, dataset.Rows);
     81      IEnumerable<int> rows = Enumerable.Range(0, dataset.Rows).ToList();
    8282      long nNodes = 0;
    8383      double c = 0;
Note: See TracChangeset for help on using the changeset viewer.