Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/10 23:49:54 (14 years ago)
Author:
swagner
Message:

Renamed classes of HeuristicLab.Data (#909)

Location:
trunk/sources/HeuristicLab.Encodings.IntVector/3.3
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Creators/UniformRandomIntVectorCreator.cs

    r3032 r3048  
    4343    /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param>
    4444    /// <returns>The newly created integer vector.</returns>
    45     public static IntArrayData Apply(IRandom random, int length, int min, int max) {
     45    public static IntArray Apply(IRandom random, int length, int min, int max) {
    4646      int[] result = new int[length];
    4747      for (int i = 0; i < length; i++)
    4848        result[i] = random.Next(min, max);
    49       return new IntArrayData(result);
     49      return new IntArray(result);
    5050    }
    5151
     
    5858    /// <param name="maximum">The maximum value of the sampling range for each vector element (exclusive).</param>
    5959    /// <returns>The newly created int vector.</returns>
    60     protected override IntArrayData Create(IRandom random, IntData length, IntData minimum, IntData maximum) {
     60    protected override IntArray Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum) {
    6161      return Apply(random, length.Value, minimum.Value, maximum.Value);
    6262    }
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Crossovers/DiscreteCrossover.cs

    r3032 r3048  
    4545    /// <param name="parent2">The second parent for the crossover operation.</param>
    4646    /// <returns>The newly created integer vector, resulting from the crossover operation.</returns>
    47     public static IntArrayData Apply(IRandom random, IntArrayData parent1, IntArrayData parent2) {
     47    public static IntArray Apply(IRandom random, IntArray parent1, IntArray parent2) {
    4848      if(parent1.Length != parent2.Length)
    4949        throw new ArgumentException("DiscreteCrossover: The parents are of different length.");
     
    5858          result[i] = parent2[i];
    5959      }
    60       return new IntArrayData(result);
     60      return new IntArray(result);
    6161    }
    6262
     
    6868    /// <param name="parents">An array containing the two integer vectors that should be crossed.</param>
    6969    /// <returns>The newly created integer vector, resulting from the crossover operation.</returns>
    70     protected override IntArrayData Cross(IRandom random, ItemArray<IntArrayData> parents) {
     70    protected override IntArray Cross(IRandom random, ItemArray<IntArray> parents) {
    7171      if (parents.Length != 2) throw new ArgumentException("ERROR in DiscreteCrossover: The number of parents is not equal to 2");
    7272      return Apply(random, parents[0], parents[1]);
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Crossovers/SinglePointCrossover.cs

    r3032 r3048  
    4545    /// <param name="parent2">The second parent for crossover.</param>
    4646    /// <returns>The newly created integer vector, resulting from the single point crossover.</returns>
    47     public static IntArrayData Apply(IRandom random, IntArrayData parent1, IntArrayData parent2) {
     47    public static IntArray Apply(IRandom random, IntArray parent1, IntArray parent2) {
    4848      if (parent1.Length != parent2.Length)
    4949        throw new ArgumentException("DiscreteCrossover: The parents are of different length.");
     
    5858        result[i] = parent2[i];
    5959
    60       return new IntArrayData(result);
     60      return new IntArray(result);
    6161    }
    6262
     
    6969    /// <param name="parents">An array containing the two integer vectors that should be crossed.</param>
    7070    /// <returns>The newly created integer vector, resulting from the single point crossover.</returns>
    71     protected override IntArrayData Cross(IRandom random, ItemArray<IntArrayData> parents) {
     71    protected override IntArray Cross(IRandom random, ItemArray<IntArray> parents) {
    7272      if (parents.Length != 2) throw new ArgumentException("ERROR in SinglePointCrossover: The number of parents is not equal to 2");
    7373      return Apply(random, parents[0], parents[1]);
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/HeuristicLab.Encodings.IntVector-3.3.csproj

    r3032 r3048  
    3232    <ErrorReport>prompt</ErrorReport>
    3333    <WarningLevel>4</WarningLevel>
     34  </PropertyGroup>
     35  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     36    <DebugSymbols>true</DebugSymbols>
     37    <OutputPath>bin\x64\Debug\</OutputPath>
     38    <DefineConstants>DEBUG;TRACE</DefineConstants>
     39    <DebugType>full</DebugType>
     40    <PlatformTarget>x64</PlatformTarget>
     41    <ErrorReport>prompt</ErrorReport>
     42  </PropertyGroup>
     43  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     44    <OutputPath>bin\x64\Release\</OutputPath>
     45    <DefineConstants>TRACE</DefineConstants>
     46    <Optimize>true</Optimize>
     47    <DebugType>pdbonly</DebugType>
     48    <PlatformTarget>x64</PlatformTarget>
     49    <ErrorReport>prompt</ErrorReport>
     50  </PropertyGroup>
     51  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     52    <DebugSymbols>true</DebugSymbols>
     53    <OutputPath>bin\x86\Debug\</OutputPath>
     54    <DefineConstants>DEBUG;TRACE</DefineConstants>
     55    <DebugType>full</DebugType>
     56    <PlatformTarget>x86</PlatformTarget>
     57    <ErrorReport>prompt</ErrorReport>
     58  </PropertyGroup>
     59  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     60    <OutputPath>bin\x86\Release\</OutputPath>
     61    <DefineConstants>TRACE</DefineConstants>
     62    <Optimize>true</Optimize>
     63    <DebugType>pdbonly</DebugType>
     64    <PlatformTarget>x86</PlatformTarget>
     65    <ErrorReport>prompt</ErrorReport>
    3466  </PropertyGroup>
    3567  <ItemGroup>
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/IntVectorCreator.cs

    r3032 r3048  
    3737      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3838    }
    39     public ILookupParameter<IntArrayData> IntVectorParameter {
    40       get { return (ILookupParameter<IntArrayData>)Parameters["IntVector"]; }
     39    public ILookupParameter<IntArray> IntVectorParameter {
     40      get { return (ILookupParameter<IntArray>)Parameters["IntVector"]; }
    4141    }
    42     public IValueLookupParameter<IntData> LengthParameter {
    43       get { return (IValueLookupParameter<IntData>)Parameters["Length"]; }
     42    public IValueLookupParameter<IntValue> LengthParameter {
     43      get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; }
    4444    }
    45     public IValueLookupParameter<IntData> MinimumParameter {
    46       get { return (IValueLookupParameter<IntData>)Parameters["Minimum"]; }
     45    public IValueLookupParameter<IntValue> MinimumParameter {
     46      get { return (IValueLookupParameter<IntValue>)Parameters["Minimum"]; }
    4747    }
    48     public IValueLookupParameter<IntData> MaximumParameter {
    49       get { return (IValueLookupParameter<IntData>)Parameters["Maximum"]; }
     48    public IValueLookupParameter<IntValue> MaximumParameter {
     49      get { return (IValueLookupParameter<IntValue>)Parameters["Maximum"]; }
    5050    }
    5151
     
    5353      : base() {
    5454      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    55       Parameters.Add(new LookupParameter<IntArrayData>("IntVector", "The vector which should be manipulated."));
    56       Parameters.Add(new ValueLookupParameter<IntData>("Length", "The length of the vector."));
    57       Parameters.Add(new ValueLookupParameter<IntData>("Minimum", "The lower bound for each element in the vector."));
    58       Parameters.Add(new ValueLookupParameter<IntData>("Maximum", "The upper bound for each element in the vector."));
     55      Parameters.Add(new LookupParameter<IntArray>("IntVector", "The vector which should be manipulated."));
     56      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
     57      Parameters.Add(new ValueLookupParameter<IntValue>("Minimum", "The lower bound for each element in the vector."));
     58      Parameters.Add(new ValueLookupParameter<IntValue>("Maximum", "The upper bound for each element in the vector."));
    5959    }
    6060
     
    6464    }
    6565
    66     protected abstract IntArrayData Create(IRandom random, IntData length, IntData minimum, IntData maximum);
     66    protected abstract IntArray Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum);
    6767  }
    6868}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/IntVectorCrossover.cs

    r3032 r3048  
    3737      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3838    }
    39     public ILookupParameter<ItemArray<IntArrayData>> ParentsParameter {
    40       get { return (SubScopesLookupParameter<IntArrayData>)Parameters["Parents"]; }
     39    public ILookupParameter<ItemArray<IntArray>> ParentsParameter {
     40      get { return (SubScopesLookupParameter<IntArray>)Parameters["Parents"]; }
    4141    }
    42     public ILookupParameter<IntArrayData> ChildParameter {
    43       get { return (ILookupParameter<IntArrayData>)Parameters["Child"]; }
     42    public ILookupParameter<IntArray> ChildParameter {
     43      get { return (ILookupParameter<IntArray>)Parameters["Child"]; }
    4444    }
    4545
     
    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<IntArrayData>("Parents", "The parent vectors which should be crossed."));
    50       Parameters.Add(new LookupParameter<IntArrayData>("Child", "The child vector resulting from the crossover."));
     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."));
    5151    }
    5252
     
    5656    }
    5757
    58     protected abstract IntArrayData Cross(IRandom random, ItemArray<IntArrayData> parents);
     58    protected abstract IntArray Cross(IRandom random, ItemArray<IntArray> parents);
    5959  }
    6060}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/IntVectorManipulator.cs

    r3032 r3048  
    3737      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3838    }
    39     public ILookupParameter<IntArrayData> IntVectorParameter {
    40       get { return (ILookupParameter<IntArrayData>)Parameters["IntVector"]; }
     39    public ILookupParameter<IntArray> IntVectorParameter {
     40      get { return (ILookupParameter<IntArray>)Parameters["IntVector"]; }
    4141    }
    4242
     
    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<IntArrayData>("IntVector", "The vector which should be manipulated."));
     46      Parameters.Add(new LookupParameter<IntArray>("IntVector", "The vector which should be manipulated."));
    4747    }
    4848
     
    5252    }
    5353
    54     protected abstract void Manipulate(IRandom random, IntArrayData intVector);
     54    protected abstract void Manipulate(IRandom random, IntArray intVector);
    5555  }
    5656}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Interfaces/IIntVectorCreator.cs

    r3032 r3048  
    2929  /// </summary>
    3030  public interface IIntVectorCreator : IIntVectorOperator, ISolutionCreator {
    31     IValueLookupParameter<IntData> LengthParameter { get; }
    32     IValueLookupParameter<IntData> MinimumParameter { get; }
    33     IValueLookupParameter<IntData> MaximumParameter { get; }
    34     ILookupParameter<IntArrayData> IntVectorParameter { get; }
     31    IValueLookupParameter<IntValue> LengthParameter { get; }
     32    IValueLookupParameter<IntValue> MinimumParameter { get; }
     33    IValueLookupParameter<IntValue> MaximumParameter { get; }
     34    ILookupParameter<IntArray> IntVectorParameter { get; }
    3535  }
    3636}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Interfaces/IIntVectorCrossover.cs

    r3032 r3048  
    2929  /// </summary>
    3030  public interface IIntVectorCrossover : IIntVectorOperator, ICrossover {
    31     ILookupParameter<ItemArray<IntArrayData>> ParentsParameter { get; }
    32     ILookupParameter<IntArrayData> ChildParameter { get; }
     31    ILookupParameter<ItemArray<IntArray>> ParentsParameter { get; }
     32    ILookupParameter<IntArray> ChildParameter { get; }
    3333  }
    3434}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Interfaces/IIntVectorManipulator.cs

    r3032 r3048  
    2929  /// </summary>
    3030  public interface IIntVectorManipulator : IIntVectorOperator, IManipulator {
    31     ILookupParameter<IntArrayData> IntVectorParameter { get; }
     31    ILookupParameter<IntArray> IntVectorParameter { get; }
    3232  }
    3333}
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Manipulators/UniformOnePositionManipulator.cs

    r3032 r3048  
    4242    /// The lower bound of the values in the int vector.
    4343    /// </summary>
    44     public ValueLookupParameter<IntData> MinimumParameter {
    45       get { return (ValueLookupParameter<IntData>)Parameters["Minimum"]; }
     44    public ValueLookupParameter<IntValue> MinimumParameter {
     45      get { return (ValueLookupParameter<IntValue>)Parameters["Minimum"]; }
    4646    }
    4747    /// <summary>
    4848    /// The upper bound of the values in the int vector.
    4949    /// </summary>
    50     public ValueLookupParameter<IntData> MaximumParameter {
    51       get { return (ValueLookupParameter<IntData>)Parameters["Maximum"]; }
     50    public ValueLookupParameter<IntValue> MaximumParameter {
     51      get { return (ValueLookupParameter<IntValue>)Parameters["Maximum"]; }
    5252    }
    5353
     
    5757    /// </summary>
    5858    public UniformOnePositionManipulator() {
    59       Parameters.Add(new ValueLookupParameter<IntData>("Minimum", "Minimum of the sampling range for the vector element (included)"));
    60       Parameters.Add(new ValueLookupParameter<IntData>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
     59      Parameters.Add(new ValueLookupParameter<IntValue>("Minimum", "Minimum of the sampling range for the vector element (included)"));
     60      Parameters.Add(new ValueLookupParameter<IntValue>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
    6161    }
    6262
     
    7070    /// <param name="max">The maximum value of the sampling range for
    7171    /// the vector element to change (exclusive).</param>
    72     public static void Apply(IRandom random, IntArrayData vector, IntData min, IntData max) {
     72    public static void Apply(IRandom random, IntArray vector, IntValue min, IntValue max) {
    7373      int index = random.Next(vector.Length);
    7474      vector[index] = random.Next(min.Value, max.Value);
     
    8181    /// <param name="random">A random number generator.</param>
    8282    /// <param name="vector">The integer vector to manipulate.</param>
    83     protected override void Manipulate(IRandom random, IntArrayData vector) {
     83    protected override void Manipulate(IRandom random, IntArray vector) {
    8484      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    8585      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/Auxiliary.cs

    r3032 r3048  
    2525namespace HeuristicLab.Encodings.IntVector_33.Tests {
    2626  public static class Auxiliary {
    27     public static bool IntVectorIsEqualByPosition(IntArrayData p1, IntArrayData p2) {
     27    public static bool IntVectorIsEqualByPosition(IntArray p1, IntArray p2) {
    2828      bool equal = (p1.Length == p2.Length);
    2929      if (equal) {
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/DiscreteCrossoverTest.cs

    r3032 r3048  
    6868    public void DiscreteCrossoverCrossTest() {
    6969      DiscreteCrossover_Accessor target = new DiscreteCrossover_Accessor(new PrivateObject(typeof(DiscreteCrossover)));
    70       ItemArray<IntArrayData> parents;
     70      ItemArray<IntArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are less than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<IntArrayData>(new IntArrayData[] { new IntArrayData(4) });
     75      parents = new ItemArray<IntArray>(new IntArray[] { new IntArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         IntArrayData actual;
     78        IntArray actual;
    7979        actual = target.Cross(random, parents);
    8080      } catch (System.ArgumentException) {
     
    9090    public void DiscreteCrossoverApplyTest() {
    9191      TestRandom random = new TestRandom();
    92       IntArrayData parent1, parent2, expected, actual;
     92      IntArray parent1, parent2, expected, actual;
    9393      bool exceptionFired;
    9494      // The following test is not based on published examples
    9595      random.Reset();
    9696      random.DoubleNumbers = new double[] { 0, 0, 0.9, 0, 0.9 };
    97       parent1 = new IntArrayData(new int[] { 2, 2, 3, 5, 1 });
    98       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
    99       expected = new IntArrayData(new int[] { 2, 2, 3, 5, 8 });
     97      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1 });
     98      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
     99      expected = new IntArray(new int[] { 2, 2, 3, 5, 8 });
    100100      actual = DiscreteCrossover.Apply(random, parent1, parent2);
    101101      Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(actual, expected));
     
    104104      random.Reset();
    105105      random.DoubleNumbers = new double[] { 0, 0, 0.9, 0, 0.9 };
    106       parent1 = new IntArrayData(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
    107       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
     106      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
     107      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
    108108      exceptionFired = false;
    109109      try {
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/HeuristicLab.Encodings.IntVector-3.3.Tests.csproj

    r3032 r3048  
    3030    <ErrorReport>prompt</ErrorReport>
    3131    <WarningLevel>4</WarningLevel>
     32  </PropertyGroup>
     33  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     34    <DebugSymbols>true</DebugSymbols>
     35    <OutputPath>bin\x64\Debug\</OutputPath>
     36    <DefineConstants>DEBUG;TRACE</DefineConstants>
     37    <DebugType>full</DebugType>
     38    <PlatformTarget>x64</PlatformTarget>
     39    <ErrorReport>prompt</ErrorReport>
     40  </PropertyGroup>
     41  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     42    <OutputPath>bin\x64\Release\</OutputPath>
     43    <DefineConstants>TRACE</DefineConstants>
     44    <Optimize>true</Optimize>
     45    <DebugType>pdbonly</DebugType>
     46    <PlatformTarget>x64</PlatformTarget>
     47    <ErrorReport>prompt</ErrorReport>
     48  </PropertyGroup>
     49  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     50    <DebugSymbols>true</DebugSymbols>
     51    <OutputPath>bin\x86\Debug\</OutputPath>
     52    <DefineConstants>DEBUG;TRACE</DefineConstants>
     53    <DebugType>full</DebugType>
     54    <PlatformTarget>x86</PlatformTarget>
     55    <ErrorReport>prompt</ErrorReport>
     56  </PropertyGroup>
     57  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     58    <OutputPath>bin\x86\Release\</OutputPath>
     59    <DefineConstants>TRACE</DefineConstants>
     60    <Optimize>true</Optimize>
     61    <DebugType>pdbonly</DebugType>
     62    <PlatformTarget>x86</PlatformTarget>
     63    <ErrorReport>prompt</ErrorReport>
    3264  </PropertyGroup>
    3365  <ItemGroup>
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/SinglePointCrossoverTest.cs

    r3032 r3048  
    6868    public void SinglePointCrossoverCrossTest() {
    6969      SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
    70       ItemArray<IntArrayData> parents;
     70      ItemArray<IntArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<IntArrayData>(new IntArrayData[] { new IntArrayData(5), new IntArrayData(6), new IntArrayData(4) });
     75      parents = new ItemArray<IntArray>(new IntArray[] { new IntArray(5), new IntArray(6), new IntArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         IntArrayData actual;
     78        IntArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<IntArrayData>(new IntArrayData[] { new IntArrayData(4) });
     87      parents = new ItemArray<IntArray>(new IntArray[] { new IntArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         IntArrayData actual;
     90        IntArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void SinglePointCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       IntArrayData parent1, parent2, expected, actual;
     104      IntArray parent1, parent2, expected, actual;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.IntNumbers = new int[] { 3 };
    109       parent1 = new IntArrayData(new int[] { 2, 2, 3, 5, 1 });
    110       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
    111       expected = new IntArrayData(new int[] { 2, 2, 3, 2, 8 });
     109      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1 });
     110      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
     111      expected = new IntArray(new int[] { 2, 2, 3, 2, 8 });
    112112      actual = SinglePointCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.IntNumbers = new int[] { 2 };
    117       parent1 = new IntArrayData(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
    118       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
     117      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
     118      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
    119119      exceptionFired = false;
    120120      try {
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/UniformOnePositionManipulatorTest.cs

    r3032 r3048  
    8585    public void UniformOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       IntArrayData parent, expected;
    88       IntData min, max;
     87      IntArray parent, expected;
     88      IntValue min, max;
    8989      // The following test is not based on published examples
    9090      random.Reset();
    9191      random.IntNumbers = new int[] { 3, 3 };
    92       parent = new IntArrayData(new int[] { 2, 2, 3, 5, 1 });
    93       expected = new IntArrayData(new int[] { 2, 2, 3, 3, 1 });
    94       min = new IntData(2);
    95       max = new IntData(7);
     92      parent = new IntArray(new int[] { 2, 2, 3, 5, 1 });
     93      expected = new IntArray(new int[] { 2, 2, 3, 3, 1 });
     94      min = new IntValue(2);
     95      max = new IntValue(7);
    9696      UniformOnePositionManipulator.Apply(random, parent, min, max);
    9797      Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(expected, parent));
Note: See TracChangeset for help on using the changeset viewer.