Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/20/10 16:21:57 (14 years ago)
Author:
abeham
Message:

#1271

  • Fixed test for SBX after changing SBX in r3172
File:
1 edited

Legend:

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

    r4068 r4872  
    9898        RealVector actual;
    9999        actual = target.Cross(random, parents);
    100       }
    101       catch (System.ArgumentException) {
     100      } catch (System.ArgumentException) {
    102101        exceptionFired = true;
    103102      }
     
    110109        RealVector actual;
    111110        actual = target.Cross(random, parents);
    112       }
    113       catch (System.ArgumentException) {
     111      } catch (System.ArgumentException) {
    114112        exceptionFired = true;
    115113      }
     
    132130      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    133131      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    134       expected = new RealVector(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 });
     132      expected = new RealVector(new double[] { 0.644880972204315, 0.0488239539275703, 0.3, 0.5, 0.1 });
    135133      actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
    136134      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    144142      try {
    145143        actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
    146       }
    147       catch (System.ArgumentException) {
     144      } catch (System.ArgumentException) {
    148145        exceptionFired = true;
    149146      }
     
    158155      try {
    159156        actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
    160       }
    161       catch (System.ArgumentException) {
     157      } catch (System.ArgumentException) {
    162158        exceptionFired = true;
    163159      }
Note: See TracChangeset for help on using the changeset viewer.