public static AdditiveMove[] Apply(IRandom random, RealVector vector, double contiguity, int sampleSize, double maxManipulation, DoubleMatrix bounds)
 {
     AdditiveMove[] moves = new AdditiveMove[sampleSize];
     for (int i = 0; i < sampleSize; i++)
     {
         int    index = random.Next(vector.Length);
         double strength = 0, min = bounds[index % bounds.Rows, 0], max = bounds[index % bounds.Rows, 1];
         do
         {
             strength = PolynomialOnePositionManipulator.Apply(random, contiguity) * maxManipulation;
         } while (vector[index] + strength <min || vector[index] + strength> max);
         moves[i] = new AdditiveMove(index, strength);
     }
     return(moves);
 }
 protected PolynomialOnePositionManipulator(PolynomialOnePositionManipulator original, Cloner cloner) : base(original, cloner) { }
Пример #3
0
 protected PolynomialOnePositionManipulator(PolynomialOnePositionManipulator original, Cloner cloner) : base(original, cloner)
 {
 }