Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/26/15 17:36:54 (9 years ago)
Author:
mkommend
Message:

#2521: Adapted unit tests in problem refactoring branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs

    r11789 r13408  
    4242    for (int i = 0; i < popSize; i++) {
    4343      population[i] = new Permutation(PermutationTypes.Absolute, qap.Weights.Rows, random);
    44       qualities[i] = QAPEvaluator.Apply(population[i], qap.Weights, qap.Distances);
     44      qualities[i] = qap.Evaluate(population[i]);
    4545    }
    4646    var bestQuality = qualities.Min();
     
    5252        nextGen[i] = PartiallyMatchedCrossover.Apply(random, parents[i * 2], parents[i * 2 + 1]);
    5353        if (random.NextDouble() < mutationRate) Swap2Manipulator.Apply(random, nextGen[i]);
    54         nextQual[i] = QAPEvaluator.Apply(nextGen[i], qap.Weights, qap.Distances);
     54        nextQual[i] = qap.Evaluate(nextGen[i]);
    5555        if (nextQual[i] < bestQuality) {
    5656          bestQuality = nextQual[i];
Note: See TracChangeset for help on using the changeset viewer.