Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/10 11:37:25 (14 years ago)
Author:
swagner
Message:

Renamed some test methods and fixed typos (#909)

Location:
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/Auxiliary.cs

    r3060 r3061  
    2020#endregion
    2121
    22 using HeuristicLab.Data;
    2322using HeuristicLab.Common;
     23using HeuristicLab.Encodings.RealVectorEncoding;
    2424
    2525namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
    2626  public static class Auxiliary {
    27     public static bool DoubleArrayIsAlmostEqualByPosition(DoubleArray p1, DoubleArray p2) {
     27    public static bool RealVectorIsAlmostEqualByPosition(RealVector p1, RealVector p2) {
    2828      bool equal = (p1.Length == p2.Length);
    2929      if (equal) {
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaBetaCrossoverTest.cs

    r3060 r3061  
    114114      expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
    115115      actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
    116       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     116      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    117117      // The following test is not based on published examples
    118118      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaCrossoverTest.cs

    r3060 r3061  
    112112      expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
    113113      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    114       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     114      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    115115      // The following test is not based on published examples
    116116      random.Reset();
     
    121121      expected = new RealVector(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
    122122      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    123       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     123      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    124124      // The following test is not based on published examples
    125125      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs

    r3060 r3061  
    101101      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 });
    102102      actual = DiscreteCrossover.Apply(random, parents);
    103       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     103      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    104104      // The following test is not based on published examples
    105105      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/HeuristicCrossoverTest.cs

    r3060 r3061  
    111111      expected = new RealVector(new double[] { 0.14, 0.23, 0.3, 0.59, -0.11 });
    112112      actual = HeuristicCrossover.Apply(random, parent1, parent2);
    113       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    114114      // The following test is not based on published examples
    115115      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/LocalCrossoverTest.cs

    r3060 r3061  
    111111      expected = new RealVector(new double[] { 0.34, 0.11, 0.3, 0.32, 0.639 });
    112112      actual = LocalCrossover.Apply(random, parent1, parent2);
    113       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    114114      // The following test is not based on published examples
    115115      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs

    r3060 r3061  
    100100      maximumGenerations = new IntValue(4);
    101101      MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    102       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
     102      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    103103      // The following test is not based on published examples
    104104      exceptionFired = false;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs

    r3060 r3061  
    101101      maximumGenerations = new IntValue(4);
    102102      MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    103       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
     103      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    104104      // The following test is not based on published examples
    105105      exceptionFired = false;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialAllPositionManipulatorTest.cs

    r3060 r3061  
    9696      maxManipulation = new DoubleValue(0.2);
    9797      PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    98       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
     98      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    9999      // The following test is not based on published examples
    100100      exceptionFired = false;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialOnePositionManipulatorTest.cs

    r3060 r3061  
    9797      maxManipulation = new DoubleValue(0.7);
    9898      PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    99       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
     99      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    100100      // The following test is not based on published examples
    101101      exceptionFired = false;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/RandomConvexCrossoverTest.cs

    r3060 r3061  
    111111      expected = new RealVector(new double[] { 0.34, 0.13, 0.3, 0.29, 0.59 });
    112112      actual = RandomConvexCrossover.Apply(random, parent1, parent2);
    113       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    114114      // The following test is not based on published examples
    115115      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs

    r3060 r3061  
    113113      expected = new RealVector(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 });
    114114      actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
    115       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     115      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    116116      // The following test is not based on published examples
    117117      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs

    r3060 r3061  
    111111      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.2, 0.8 });
    112112      actual = SinglePointCrossover.Apply(random, parent1, parent2);
    113       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(actual, expected));
     113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
    114114      // The following test is not based on published examples
    115115      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs

    r3060 r3061  
    9696      max = new DoubleValue(0.7);
    9797      UniformOnePositionManipulator.Apply(random, parent, min, max);
    98       Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
     98      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    9999    }
    100100
Note: See TracChangeset for help on using the changeset viewer.