Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3061


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
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab 3.3.sln

    r3053 r3061  
    5555    {BB994448-2B21-4564-BB2E-38D8FFF8CF18} = {BB994448-2B21-4564-BB2E-38D8FFF8CF18}
    5656    {C49CB749-8B24-4628-8003-E86475749410} = {C49CB749-8B24-4628-8003-E86475749410}
     57    {BB6D334A-4BB6-4674-9883-31A6EBB32CAB} = {BB6D334A-4BB6-4674-9883-31A6EBB32CAB}
    5758    {2C36CD4F-E5F5-43A4-801A-201EA895FE17} = {2C36CD4F-E5F5-43A4-801A-201EA895FE17}
    5859    {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} = {3BD61258-31DA-4B09-89C0-4F71FEF5F05A}
    5960    {C664305E-497C-4533-A140-967DEDB05C19} = {C664305E-497C-4533-A140-967DEDB05C19}
     61    {6F18ED66-2333-4B5C-B882-AC99FB3CDCE5} = {6F18ED66-2333-4B5C-B882-AC99FB3CDCE5}
    6062    {56F9106A-079F-4C61-92F6-86A84C2D84B7} = {56F9106A-079F-4C61-92F6-86A84C2D84B7}
     63    {30D6606B-96E7-436C-B5D7-EA1455848E37} = {30D6606B-96E7-436C-B5D7-EA1455848E37}
    6164    {DC3D7072-7999-4719-B65D-3997744D5DC1} = {DC3D7072-7999-4719-B65D-3997744D5DC1}
    6265    {F42F3576-7233-4B28-90F7-36AE15F30F92} = {F42F3576-7233-4B28-90F7-36AE15F30F92}
     
    6467    {57F38579-409D-4DD8-AB19-3F2C4A665126} = {57F38579-409D-4DD8-AB19-3F2C4A665126}
    6568    {4ABA047D-46DD-4608-9E4A-41C5F92FDBB1} = {4ABA047D-46DD-4608-9E4A-41C5F92FDBB1}
     69    {8FA6898D-E4B0-4E08-A6D6-F9F520E7959F} = {8FA6898D-E4B0-4E08-A6D6-F9F520E7959F}
    6670    {BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {BF7D9494-A586-457B-8DF9-ED599F9E6A71}
    6771    {600287A3-8714-453E-B875-A05F3EB72315} = {600287A3-8714-453E-B875-A05F3EB72315}
     
    7175    {958B43BC-CC5C-4FA2-8628-2B3B01D890B6} = {958B43BC-CC5C-4FA2-8628-2B3B01D890B6}
    7276    {AB687BBE-1BFE-476B-906D-44237135431D} = {AB687BBE-1BFE-476B-906D-44237135431D}
     77    {66D249C3-A01D-42A8-82A2-919BC8EC3D83} = {66D249C3-A01D-42A8-82A2-919BC8EC3D83}
    7378    {4C3305C4-E440-4EAD-B218-68D77AE51543} = {4C3305C4-E440-4EAD-B218-68D77AE51543}
    7479    {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C} = {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}
     
    7782    {EE2034D9-6E27-48A1-B855-42D45F69A4FC} = {EE2034D9-6E27-48A1-B855-42D45F69A4FC}
    7883    {1B3063DB-D71C-4A6A-A359-883E8F53A140} = {1B3063DB-D71C-4A6A-A359-883E8F53A140}
     84    {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} = {DDFB14DD-2A85-493C-A52D-E69729BBAEB0}
    7985    {35A42EE0-A896-4D7A-A99F-8ED9E925F320} = {35A42EE0-A896-4D7A-A99F-8ED9E925F320}
    8086    {AE5B1CE5-9862-4D6F-A700-D72CD9AEA295} = {AE5B1CE5-9862-4D6F-A700-D72CD9AEA295}
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs

    r3055 r3061  
    4747      : base() {
    4848      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    49       Parameters.Add(new LookupParameter<IntArray>("BinaryVector", "The vector which should be manipulated."));
     49      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The vector which should be manipulated."));
    5050      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
    5151    }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs

    r3055 r3061  
    4747      : base() {
    4848      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
    49       Parameters.Add(new SubScopesLookupParameter<IntArray>("Parents", "The parent vectors which should be crossed."));
    50       Parameters.Add(new LookupParameter<IntArray>("Child", "The child vector resulting from the crossover."));
     49      Parameters.Add(new SubScopesLookupParameter<BinaryVector>("Parents", "The parent vectors which should be crossed."));
     50      Parameters.Add(new LookupParameter<BinaryVector>("Child", "The child vector resulting from the crossover."));
    5151    }
    5252
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs

    r3055 r3061  
    4444      : base() {
    4545      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    46       Parameters.Add(new LookupParameter<IntArray>("BinaryVector", "The vector which should be manipulated."));
     46      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The vector which should be manipulated."));
    4747    }
    4848
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs

    r3053 r3061  
    2020#endregion
    2121
    22 using HeuristicLab.Data;
    2322using HeuristicLab.Common;
     23using HeuristicLab.Encodings.BinaryVectorEncoding;
    2424
    2525namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
    2626  public static class Auxiliary {
    27     public static bool BoolVectorIsEqualByPosition(BoolArray p1, BoolArray p2) {
     27    public static bool BinaryVectorIsEqualByPosition(BinaryVector p1, BinaryVector p2) {
    2828      bool equal = (p1.Length == p2.Length);
    2929      if (equal) {
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs

    r3053 r3061  
    2020#endregion
    2121
    22 using HeuristicLab.Data;
    2322using HeuristicLab.Common;
     23using HeuristicLab.Encodings.IntegerVectorEncoding;
    2424
    2525namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
    2626  public static class Auxiliary {
    27     public static bool IntVectorIsEqualByPosition(IntArray p1, IntArray p2) {
     27    public static bool IntegerVectorIsEqualByPosition(IntegerVector p1, IntegerVector p2) {
    2828      bool equal = (p1.Length == p2.Length);
    2929      if (equal) {
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs

    r3059 r3061  
    7676      exceptionFired = false;
    7777      try {
    78         IntArray actual;
     78        IntegerVector actual;
    7979        actual = target.Cross(random, parents);
    8080      } catch (System.ArgumentException) {
     
    9999      expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 });
    100100      actual = DiscreteCrossover.Apply(random, parent1, parent2);
    101       Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(actual, expected));
     101      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected));
    102102
    103103      // The following test is not based on published examples
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs

    r3059 r3061  
    111111      expected = new IntegerVector(new int[] { 2, 2, 3, 2, 8 });
    112112      actual = SinglePointCrossover.Apply(random, parent1, parent2);
    113       Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(actual, expected));
     113      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected));
    114114      // The following test is not based on published examples
    115115      random.Reset();
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs

    r3059 r3061  
    9595      max = new IntValue(7);
    9696      UniformOnePositionManipulator.Apply(random, parent, min, max);
    97       Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(expected, parent));
     97      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent));
    9898    }
    9999
  • 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.