Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/11 23:21:06 (13 years ago)
Author:
abeham
Message:

#1614

  • changed !QAPMoveEvaluatorTest slightly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPMoveEvaluatorTest.cs

    r6878 r6890  
    233233        // SYMMETRIC MATRICES
    234234        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
    235         Permutation clone = new Cloner().Clone(assignment);
     235        double move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, symmetricWeights, symmetricDistances);
    236236        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
    237237        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
    238         double move = QAPScrambleMoveEvaluator.Apply(clone, scramble, symmetricWeights, symmetricDistances);
    239238        Assert.IsTrue(move.IsAlmost(after - before), "Failed on symmetric matrices");
    240239
    241240        // ASYMMETRIC MATRICES
    242241        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
    243         clone = new Cloner().Clone(assignment);
     242        move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, asymmetricWeights, asymmetricDistances);
    244243        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
    245244        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
    246         move = QAPScrambleMoveEvaluator.Apply(clone, scramble, asymmetricWeights, asymmetricDistances);
    247245        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
    248246
    249247        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
    250248        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
    251         clone = new Cloner().Clone(assignment);
     249        move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
    252250        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
    253251        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
    254         move = QAPScrambleMoveEvaluator.Apply(clone, scramble, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
    255252        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
    256253      }
Note: See TracChangeset for help on using the changeset viewer.