Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/09 10:20:40 (16 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.RealVector namespace (#331)

Location:
trunk/sources/HeuristicLab.RealVector
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.RealVector/BlendAlphaBetaCrossover.cs

    r104 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Blend alpha-beta crossover for real vectors. Creates a new offspring by selecting a
     32  /// random value from the interval between the two alleles of the parent solutions.
     33  /// The interval is increased in both directions as follows: Into the direction of the 'better'
     34  /// solution by the factor alpha, into the direction of the 'worse' solution by the factor beta.
     35  /// </summary>
    3036  public class BlendAlphaBetaCrossover : CrossoverBase {
     37    /// <inheritdoc select="summary"/>
    3138    public override string Description {
    3239      get { return
     
    3643    }
    3744
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="BlendAlphaBetaCrossover"/> with five variable infos
     47    /// (<c>Maximization</c>, <c>Quality</c>, <c>RealVector</c>, <c>Alpha</c> and <c>Beta</c>).
     48    /// </summary>
    3849    public BlendAlphaBetaCrossover()
    3950      : base() {
     
    5162    }
    5263
     64    /// <summary>
     65    /// Performs a blend alpha beta crossover of two real vectors.
     66    /// </summary>
     67    /// <param name="random">The random number generator.</param>
     68    /// <param name="maximization">Boolean flag whether it is a maximization problem.</param>
     69    /// <param name="parent1">The first parent for the crossover.</param>
     70    /// <param name="quality1">The quality of the first parent.</param>
     71    /// <param name="parent2">The second parent for the crossover.</param>
     72    /// <param name="quality2">The quality of the second parent.</param>
     73    /// <param name="alpha">The alpha value for the crossover.</param>
     74    /// <param name="beta">The beta value for the crossover operation.</param>
     75    /// <returns>The newly created real vector resulting from the crossover.</returns>
    5376    public static double[] Apply(IRandom random, bool maximization, double[] parent1, double quality1, double[] parent2, double quality2, double alpha, double beta) {
    5477      int length = parent1.Length;
     
    86109    }
    87110
     111    /// <summary>
     112    /// Performs a blend alpha beta crossover of two real vectors.
     113    /// </summary>
     114    /// <param name="scope">The current scope.</param>
     115    /// <param name="random">The random number generator.</param>
     116    /// <param name="parent1">The first parent for the crossover.</param>
     117    /// <param name="parent2">The second parent for the crossover.</param>
     118    /// <param name="child">The created child generated through the blend alpha beta crossover.</param>
    88119    protected sealed override void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child) {
    89120      bool maximization = GetVariableValue<BoolData>("Maximization", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/BlendAlphaCrossover.cs

    r104 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Blend alpha crossover for real vectors. Creates a new offspring by selecting a random value
     31  /// from the interval between the two alleles of the parent solutions. The interval is increased
     32  /// in both directions by the factor alpha.
     33  /// </summary>
    2934  public class BlendAlphaCrossover : RealVectorCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return
     
    3541    }
    3642
     43    /// <summary>
     44    /// Initializes a new instance of <see cref="BlendAlphaCrossover"/> with one variable info (<c>Alpha</c>).
     45    /// </summary>
    3746    public BlendAlphaCrossover()
    3847      : base() {
     
    4352    }
    4453
     54    /// <summary>
     55    /// Performs a blend alpha crossover of two real vectors.
     56    /// </summary>
     57    /// <param name="random">The random number generator.</param>
     58    /// <param name="parent1">The first parent for the crossover operation.</param>
     59    /// <param name="parent2">The second parent for the crossover operation.</param>
     60    /// <param name="alpha">The alpha value for the crossover.</param>
     61    /// <returns>The newly created real vector resulting from the crossover operation.</returns>
    4562    public static double[] Apply(IRandom random, double[] parent1, double[] parent2, double alpha) {
    4663      int length = parent1.Length;
     
    6077    }
    6178
     79    /// <summary>
     80    /// Performs a blend alpha crossover of two real vectors.
     81    /// </summary>
     82    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     83    /// <param name="scope">The current scope.</param>
     84    /// <param name="random">The random number generator.</param>
     85    /// <param name="parent1">The first parent for the crossover operation.</param>
     86    /// <param name="parent2">The second parent for the crossover operation.</param>
     87    /// <returns>The newly created real vector, resulting from the blend alpha crossover.</returns>
    6288    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    6389      double alpha = GetVariableValue<DoubleData>("Alpha", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/BoundsChecker.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Checks if all elements of a real vector are inside a given minimum and maximum value.
     31  /// If not, the elements are corrected.
     32  /// </summary>
    2933  public class BoundsChecker : OperatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return "Checks if all elements of a real vector are inside a given minimum and maximum value. If not, elements are corrected."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="BoundsChecker"/> with three variable infos
     41    /// (<c>RealVector</c>, <c>Minimum</c> and <c>Maximum</c>).
     42    /// </summary>
    3443    public BoundsChecker()
    3544      : base() {
     
    3948    }
    4049
     50    /// <summary>
     51    /// Checks if all elements of the given <paramref name="vector"/> are inside the given minimum
     52    /// and maximum value and if not they are corrected.
     53    /// </summary>
     54    /// <param name="min">The minimum value of the range (inclusive).</param>
     55    /// <param name="max">The maximum value of the range (inclusive).</param>
     56    /// <param name="vector">The vector to check.</param>
     57    /// <returns>The corrected real vector.</returns>
    4158    public static double[] Apply(double min, double max, double[] vector) {
    4259      int length = vector.Length;
     
    5067    }
    5168
     69    /// <summary>
     70    /// Checks if all elements of the given <paramref name="vector"/> are inside the given minimum
     71    /// and maximum value and if not they are corrected.
     72    /// </summary>
     73    /// <remarks>Calls <see cref="Apply(double, double, double[])"/>.</remarks>
     74    /// <param name="scope">The current scope.</param>
     75    /// <returns><c>null</c>.</returns>
    5276    public override IOperation Apply(IScope scope) {
    5377      DoubleArrayData vector = GetVariableValue<DoubleArrayData>("RealVector", scope, false);
  • trunk/sources/HeuristicLab.RealVector/BreederGeneticAlgorithmManipulator.cs

    r104 r1184  
    2929  /// <summary>
    3030  /// Mühlenbein, Schlierkamp-Voosen (1993)
    31   /// Predictive Models for the Breeder Genetic Algorithm I. Continuous Parameter Optimization
     31  /// Predictive Models for the Breeder Genetic Algorithm I. Continuous Parameter Optimization<br/>
     32  /// Changes one position of a real vector by adding/substracting a value of the interval [(2^-15)*range, ..., (2^0)*range], where range is SearchIntervalFactor * (max - min).
    3233  /// </summary>
    3334  public class BreederGeneticAlgorithmManipulator : RealVectorManipulatorBase {
     35    /// <inheritdoc select="summary"/>
    3436    public override string Description {
    3537      get {
     
    4143    }
    4244
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="BreederGeneticAlgorithmManipulator"/> with three variable
     47    /// infos (<c>Minimum</c>, <c>Maximum</c> and <c>SearchIntervalFactor</c>).
     48    /// </summary>
    4349    public BreederGeneticAlgorithmManipulator()
    4450      : base() {
     
    5157    }
    5258
     59    /// <summary>
     60    /// Performs a Breeder Genetic Algorithm Manipulation on the given <paramref name="vector"/>.
     61    /// </summary>
     62    /// <param name="scope">The current scope.</param>
     63    /// <param name="random">A random number generator.</param>
     64    /// <param name="vector">The real vector to manipulate.</param>
     65    /// <param name="min">The minimum number of the sampling range for the vector element (inclusive).</param>
     66    /// <param name="max">The maximum number of the sampling range for the vector element (exclusive).</param>
     67    /// <param name="searchIntervalFactor">The factor determining the size of the search interval.</param>
     68    /// <returns>The manipulated real vector.</returns>
    5369    public static double[] Apply(IScope scope, IRandom random, double[] vector, double min, double max, double searchIntervalFactor) {
    5470      int length = vector.Length;
     
    8096    }
    8197
     98    /// <summary>
     99    /// Performs a Breeder Genetic Algorithm Manipulation on the given <paramref name="vector"/>.
     100    /// </summary>
     101    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     102    /// <param name="scope">The current scope.</param>
     103    /// <param name="random">The random number generator.</param>
     104    /// <param name="vector">The real vector to manipulate.</param>
     105    /// <returns>The manipulated real vector</returns>
    82106    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    83107      double min = GetVariableValue<DoubleData>("Minimum", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/CompleteContinuousCrossover.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Complete continuous crossover for real vectors: for each element of the new vector the average
     31  /// of both parents is calculated.
     32  /// </summary>
    2933  public class CompleteContinuousCrossover : RealVectorCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return "Complete continuous crossover for real vectors."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Performs a complete continuous crossover of the two given real vectors.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="parent1">The first parent for the crossover.</param>
     44    /// <param name="parent2">The second parent for the crossover.</param>
     45    /// <returns>The newly created real vector, resulting from the complete continuous crossover.</returns>
    3446    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3547      int length = parent1.Length;
     
    4153    }
    4254
     55    /// <summary>
     56    /// Performs a complete continuous crossover of the two given real vectors.
     57    /// </summary>
     58    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     59    /// <param name="scope">The current scope.</param>
     60    /// <param name="random">The random number generator.</param>
     61    /// <param name="parent1">The first parent for the crossover.</param>
     62    /// <param name="parent2">The second parent for the crossover.</param>
     63    /// <returns>The newly created real vector, resulting from the complete continuous crossover.</returns>
    4364    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4465      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/ContinuousCrossover.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Continuous crossover for real vectors: for each element randomly either the element of the first
     31  /// parent or the average of both parents is selected.
     32  /// </summary>
    2933  public class ContinuousCrossover : RealVectorCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return "Continuous crossover for real vectors."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Performs a continuous crossover of the two given real vectors.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="parent1">The first parent for the crossover.</param>
     44    /// <param name="parent2">The second parent for the crossover.</param>
     45    /// <returns>The newly created real vector, resulting from the continuous crossover.</returns>
    3446    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3547      int length = parent1.Length;
     
    4658    }
    4759
     60    /// <summary>
     61    /// Performs a continuous crossover of the two given real vectors.
     62    /// </summary>
     63    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     64    /// <param name="scope">The current scope.</param>
     65    /// <param name="random">The random number generator.</param>
     66    /// <param name="parent1">The first parent for the crossover.</param>
     67    /// <param name="parent2">The second parent for the crossover.</param>
     68    /// <returns>The newly created real vector, resulting from the continuous crossover.</returns>
    4869    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4970      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/ContinuousManipulator.cs

    r293 r1184  
    2626
    2727namespace HeuristicLab.RealVector {
     28  /// <summary>
     29  /// Continuous manipulator for real vectors: selects randomly two elements of the vector,
     30  /// calculates its average value and replaces the first selected element with the new value.
     31  /// </summary>
    2832  public class ContinuousManipulator : RealVectorManipulatorBase {
     33    /// <inheritdoc select="summary"/>
    2934    public override string Description {
    3035      get { return "This operator randomly selects two elements of the vector, calculates its average value and replaces the first selected element with the new value."; }
    3136    }
    3237
     38    /// <summary>
     39    /// Performs a continuous manipulation of the given <paramref name="vector"/>.
     40    /// </summary>
     41    /// <param name="random">The random number generator.</param>
     42    /// <param name="vector">The real vector to manipulate.</param>
     43    /// <returns>The manipulated real vector.</returns>
    3344    public static double[] Apply(IRandom random, double[] vector) {
    3445      int length = vector.Length;
     
    4657    }
    4758
     59    /// <summary>
     60    /// Performs a continuous manipulation of the given <paramref name="vector"/>.
     61    /// </summary>
     62    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     63    /// <param name="scope">The current scope.</param>
     64    /// <param name="random">The random number generator.</param>
     65    /// <param name="vector">The real vector to manipulate.</param>
     66    /// <returns>The manipulated real vector.</returns>
    4867    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    4968      return Apply(random, vector);
  • trunk/sources/HeuristicLab.RealVector/DiscreteCrossover.cs

    r102 r1184  
    2626
    2727namespace HeuristicLab.RealVector {
     28  /// <summary>
     29  /// Discrete crossover for real vectors: Selects randomly either the value of the first or the
     30  /// second parent.
     31  /// </summary>
    2832  public class DiscreteCrossover : RealVectorCrossoverBase {
     33    /// <inheritdoc select="summary"/>
    2934    public override string Description {
    3035      get { return "Discrete crossover for real vectors."; }
    3136    }
    3237
     38    /// <summary>
     39    /// Performs a discrete crossover operation of the two given parents.
     40    /// </summary>
     41    /// <param name="random">A random number generator.</param>
     42    /// <param name="parent1">The first parent for the crossover operation.</param>
     43    /// <param name="parent2">The second parent for the crossover operation.</param>
     44    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    3345    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3446      int length = parent1.Length;
     
    4456    }
    4557
     58    /// <summary>
     59    /// Performs a discrete crossover operation of the two given parents.
     60    /// </summary>
     61    /// <param name="scope">The current scope.</param>
     62    /// <param name="random">A random number generator.</param>
     63    /// <param name="parent1">The first parent for the crossover operation.</param>
     64    /// <param name="parent2">The second parent for the crossover operation.</param>
     65    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    4666    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4767      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/DiscreteMultiCrossover.cs

    r111 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Discrete multiple crossover for real vectors: For each position in the new vector an allele
     31  /// of one of the parents is randomly selected.
     32  /// </summary>
    2933  public class DiscreteMultiCrossover : RealVectorMultiCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get {
     
    3439    }
    3540
     41    /// <summary>
     42    /// Performs a discrete multiple crossover on the given <paramref name="parents"/>.     
     43    /// </summary>
     44    /// <exception cref="InvalidOperationException">Thrown when the parents have different lengths.</exception>
     45    /// <param name="random">The random number generator.</param>
     46    /// <param name="parents">The list of parents for the multiple crossover.</param>
     47    /// <returns>The newly created real vector, resulting from the discrete multiple crossover.</returns>
    3648    public static double[] Apply(IRandom random, IList<double[]> parents) {
    3749      int length = parents[0].Length;
     
    4759    }
    4860
     61    /// <summary>
     62    /// Performs a discrete multiple crossover on the given <paramref name="parents"/>.
     63    /// </summary>
     64    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     65    /// <param name="scope">The current scope.</param>
     66    /// <param name="random">The random number generator.</param>
     67    /// <param name="parents">The list of parents for the multiple crossover.</param>
     68    /// <returns>The newly created real vector, resulting from the discrete multiple crossover.</returns>
    4969    protected override double[] Cross(IScope scope, IRandom random, IList<double[]> parents) {
    5070      return Apply(random, parents);
  • trunk/sources/HeuristicLab.RealVector/HeuristicCrossover.cs

    r102 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Heuristic crossover for real vectors: Takes for each position the better parent and adds the difference
     32  /// of the two parents times a randomly chosen factor.
     33  /// </summary>
    3034  public class HeuristicCrossover : CrossoverBase {
     35    /// <summary>
     36    /// Initializes a new instance of <see cref="HeuristicCrossover"/> with three variable infos
     37    /// (<c>Maximization</c>, <c>Quality</c> and <c>RealVector</c>).
     38    /// </summary>
    3139    public HeuristicCrossover()
    3240      : base() {
     
    3644    }
    3745
     46    /// <inheritdoc select="summary"/>
    3847    public override string Description {
    3948      get { return "Heuristic crossover for real vectors."; }
    4049    }
    4150
     51    /// <summary>
     52    /// Perfomrs a heuristic crossover on the two given parents.
     53    /// </summary>
     54    /// <param name="random">The random number generator.</param>
     55    /// <param name="maximization">Boolean flag whether it is a maximization problem.</param>
     56    /// <param name="parent1">The first parent for the crossover operation.</param>
     57    /// <param name="quality1">The quality of the first parent.</param>
     58    /// <param name="parent2">The second parent for the crossover operation.</param>
     59    /// <param name="quality2">The quality of the second parent.</param>
     60    /// <returns>The newly created real vector, resulting from the heuristic crossover.</returns>
    4261    public static double[] Apply(IRandom random, bool maximization, double[] parent1, double quality1, double[] parent2, double quality2) {
    4362      int length = parent1.Length;
     
    5473    }
    5574
     75    /// <summary>
     76    /// Perfomrs a heuristic crossover on the two given parents.
     77    /// </summary>
     78    /// <exception cref="InvalidOperationException">Thrown when the parent vectors have different lengths.</exception>
     79    /// <param name="scope">The current scope.</param>
     80    /// <param name="random">The random number generator.</param>
     81    /// <param name="parent1">The first parent for the crossover operation.</param>
     82    /// <param name="parent2">The second parent for the crossover operation.</param>
     83    /// <param name="child">The newly created real vector, resulting from the heuristic crossover.</param>
    5684    protected sealed override void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child) {
    5785      bool maximization = GetVariableValue<BoolData>("Maximization", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/HeuristicLabRealVectorPlugin.cs

    r1056 r1184  
    2626
    2727namespace HeuristicLab.RealVector {
     28  /// <summary>
     29  /// Plugin class for HeuristicLab.RealVector plugin.
     30  /// </summary>
    2831  [ClassInfo(Name = "HeuristicLab.RealVector-3.2")]
    2932  [PluginFile(Filename = "HeuristicLab.RealVector-3.2.dll", Filetype = PluginFileType.Assembly)]
  • trunk/sources/HeuristicLab.RealVector/IntermediateMultiCrossover.cs

    r111 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Intermediate multiple crossover: Creates a new offspring by computing the centroid of a list of
     31  /// parents.
     32  /// </summary>
    2933  public class IntermediateMultiCrossover : RealVectorMultiCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get {
     
    3439    }
    3540
     41    /// <summary>
     42    /// Performs an intermediate multiple crossover of the given list of <paramref name="parents"/>.
     43    /// </summary>
     44    /// <param name="parents">The list of parents of which to perform the crossover.</param>
     45    /// <returns>The newly created real vector, resulting from the intermediate multiple crossover.</returns>
    3646    public static double[] Apply(IList<double[]> parents) {
    3747      int length = parents[0].Length;
     
    4656    }
    4757
     58    /// <summary>
     59    /// Performs an intermediate multiple crossover of the given list of <paramref name="parents"/>.
     60    /// </summary>
     61    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     62    /// <param name="scope">The current scope.</param>
     63    /// <param name="random">A random number generator.</param>
     64    /// <param name="parents">The list of parents of which to perform the crossover.</param>
     65    /// <returns>The newly created real vector, resulting from the intermediate multiple crossover.</returns>
    4866    protected override double[] Cross(IScope scope, IRandom random, IList<double[]> parents) {
    4967      return Apply(parents);
  • trunk/sources/HeuristicLab.RealVector/LocalCrossover.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Local crossover for real vectors: Takes for each element the allele of the first parent times a
     31  /// always newly created randomly chosen factor and adds the allele of the second parent times (1 - the randomly chosen factor).
     32  /// </summary>
    2933  public class LocalCrossover : RealVectorCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return "Local crossover for real vectors."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Performs a local crossover on the two given parent vectors.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="parent1">The first parent for the crossover operation.</param>
     44    /// <param name="parent2">The second parent for the crossover operation.</param>
     45    /// <returns>The newly created real vector, resulting from the local crossover.</returns>
    3446    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3547      double factor;
     
    4456    }
    4557
     58    /// <summary>
     59    /// Performs a local crossover on the two given parent vectors.
     60    /// </summary>
     61    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     62    /// <param name="scope">The current scope.</param>
     63    /// <param name="random">The random number generator.</param>
     64    /// <param name="parent1">The first parent for the crossover operation.</param>
     65    /// <param name="parent2">The second parent for the crossover operation.</param>
     66    /// <returns>The newly created real vector, resulting from the local crossover.</returns>
    4667    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4768      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/MichalewiczNonUniformAllPositionsManipulator.cs

    r294 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Michalewicz, Z. (1992). Genetic Algorithms + Data Structures = Evolution Programs <br/>
     31  /// Non-uniformly distributed change of all positions of a real vector.
     32  /// </summary>
    2933  public class MichalewiczNonUniformAllPositionsManipulator : RealVectorManipulatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return
     
    3742    }
    3843
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="MichalewiczNonUniformAllPositionsManipulator"/> with
     46    /// five variable infos (<c>Minimum</c>, <c>Maximum</c>, <c>CurrentGeneration</c>,
     47    /// <c>MaximumGenerations</c> and <c>GenerationsDependency</c>).
     48    /// </summary>
    3949    public MichalewiczNonUniformAllPositionsManipulator()
    4050      : base() {
     
    4959    }
    5060
     61    /// <summary>
     62    /// Performs a non uniformly distributed all position manipulation on the given
     63    /// real <paramref name="vector"/>, published by Z. Michalewicz, 1992.
     64    /// </summary>
     65    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     66    /// <param name="scope">The current scope.</param>
     67    /// <param name="random">The random number generator.</param>
     68    /// <param name="vector">The real vector to manipulate.</param>
     69    /// <returns>The manipulated real vector.</returns>
    5170    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    5271      double min = GetVariableValue<DoubleData>("Minimum", scope, true).Data;
     
    5877    }
    5978
     79    /// <summary>
     80    /// Performs a non uniformly distributed all position manipulation on the given
     81    /// real <paramref name="vector"/>, published by Z. Michalewicz, 1992.
     82    /// </summary>
     83    /// <param name="random">The random number generator.</param>
     84    /// <param name="vector">The real vector to manipulate.</param>
     85    /// <param name="min">The minimum value of the sampling range for the vector element (inclusive).</param>
     86    /// <param name="max">The maximum value of the sampling range for the vector element (exclusive).</param>
     87    /// <param name="currentGeneration">The current generation of the algorithm.</param>
     88    /// <param name="maximumGenerations">Maximum number of generations.</param>
     89    /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations.</param>
     90    /// <returns>The manipulated real vector.</returns>
    6091    public static double[] Apply(IRandom random, double[] vector, double min, double max, int currentGeneration, int maximumGenerations, int generationsDependency) {
    6192      int length = vector.Length;
  • trunk/sources/HeuristicLab.RealVector/MichalewiczNonUniformOnePositionManipulator.cs

    r294 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Michalewicz, Z. (1992). Genetic Algorithms + Data Structures = Evolution Programs<br/>
     31  /// Non-uniformly distributed change of one position of a real vector.
     32  /// </summary>
    2933  public class MichalewiczNonUniformOnePositionManipulator : RealVectorManipulatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return
     
    3742    }
    3843
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="MichalewiczNonUniformOnePositionManipulator"/> with five
     46    /// variable infos (<c>Minimum</c>, <c>Maximum</c>, <c>CurrentGeneration</c>, <c>MaximumGenerations</c>
     47    /// and <c>GenerationsDependency</c>).
     48    /// </summary>
    3949    public MichalewiczNonUniformOnePositionManipulator()
    4050      : base() {
     
    4959    }
    5060
     61    /// <summary>
     62    /// Performs a non uniformly distributed one position manipulation on the given
     63    /// real <paramref name="vector"/>, published by Z. Michalewicz, 1992.
     64    /// </summary>
     65    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     66    /// <param name="scope">The current scope.</param>
     67    /// <param name="random">The random number generator.</param>
     68    /// <param name="vector">The real vector to manipulate.</param>
     69    /// <returns>The manipulated real vector.</returns>
    5170    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    5271      double min = GetVariableValue<DoubleData>("Minimum", scope, true).Data;
     
    5877    }
    5978
     79    /// <summary>
     80    /// Performs a non uniformly distributed one position manipulation on the given
     81    /// real <paramref name="vector"/>, published by Z. Michalewicz, 1992.
     82    /// </summary>
     83    /// <param name="random">The random number generator.</param>
     84    /// <param name="vector">The real vector to manipulate.</param>
     85    /// <param name="min">The minimum value of the sampling range for the vector element (inclusive).</param>
     86    /// <param name="max">The maximum value of the sampling range for the vector element (exclusive).</param>
     87    /// <param name="currentGeneration">The current generation of the algorithm.</param>
     88    /// <param name="maximumGenerations">Maximum number of generations.</param>
     89    /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations.</param>
     90    /// <returns>The manipulated real vector.</returns>
    6091    public static double[] Apply(IRandom random, double[] vector, double min, double max, int currentGeneration, int maximumGenerations, int generationsDependency) {
    6192      int length = vector.Length;
  • trunk/sources/HeuristicLab.RealVector/RandomConvexCrossover.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Random convex crossover for real vectors: Takes for each element the allele of the first parent times a
     31  /// once created randomly chosen factor and adds the allele of the second parent times
     32  /// (1 - the randomly chosen factor).
     33  /// </summary>
    2934  public class RandomConvexCrossover : RealVectorCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return "Random convex crossover for real vectors."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Performs a random convex crossover on the two given parents.
     42    /// </summary>
     43    /// <param name="random">The random number generator.</param>
     44    /// <param name="parent1">The first parent vector for the crossover.</param>
     45    /// <param name="parent2">The second parent vector for the crossover.</param>
     46    /// <returns>The newly created real vector, resulting from the random convex crossover.</returns>
    3447    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3548      int length = parent1.Length;
     
    4255    }
    4356
     57    /// <summary>
     58    /// Performs a random convex crossover on the two given parents.
     59    /// </summary>
     60    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     61    /// <param name="scope">The current scope.</param>
     62    /// <param name="random">The random number generator.</param>
     63    /// <param name="parent1">The first parent vector for the crossover.</param>
     64    /// <param name="parent2">The second parent vector for the crossover.</param>
     65    /// <returns>The newly created real vector, resulting from the random convex crossover.</returns>
    4466    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4567      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/RealVectorCrossoverBase.cs

    r77 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Base class for all real vector crossover operators.
     32  /// </summary>
    3033  public abstract class RealVectorCrossoverBase : CrossoverBase {
     34    /// <summary>
     35    /// Initializes a new instance of <see cref="RealVectorCrossoverBase"/> with one variable info
     36    /// (<c>RealVector</c>).
     37    /// </summary>
    3138    public RealVectorCrossoverBase()
    3239      : base() {
     
    3441    }
    3542
     43    /// <summary>
     44    /// Performs a crossover of two given parents.
     45    /// </summary>
     46    /// <param name="scope">The current scope.</param>
     47    /// <param name="random">A random number generator.</param>
     48    /// <param name="parent1">The first parent for crossover.</param>
     49    /// <param name="parent2">The second parent for crossover.</param>
     50    /// <param name="child">The resulting child scope.</param>
    3651    protected sealed override void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child) {
    3752      DoubleArrayData vector1 = parent1.GetVariableValue<DoubleArrayData>("RealVector", false);
     
    4459    }
    4560
     61    /// <summary>
     62    /// Performs a crossover of two given parents.
     63    /// </summary>
     64    /// <param name="scope">The current scope.</param>
     65    /// <param name="random">A random number generator.</param>
     66    /// <param name="parent1">The first parent for crossover.</param>
     67    /// <param name="parent2">The second parent for crossover.</param>
     68    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    4669    protected abstract double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2);
    4770  }
  • trunk/sources/HeuristicLab.RealVector/RealVectorManipulatorBase.cs

    r2 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Base class for all real vector manipulators.
     31  /// </summary>
    2932  public abstract class RealVectorManipulatorBase : OperatorBase {
     33    /// <summary>
     34    /// Initializes a new instance of <see cref="RealVectorManipulatorBase"/> with two variable infos
     35    /// (<c>Random</c> and <c>RealVector</c>).
     36    /// </summary>
    3037    public RealVectorManipulatorBase() {
    3138      AddVariableInfo(new VariableInfo("Random", "Pseudo random number generator", typeof(IRandom), VariableKind.In));
     
    3340    }
    3441
     42    /// <summary>
     43    /// Manipulates the real vector.
     44    /// </summary>
     45    /// <param name="scope">The current scope whose real vector to manipulate.</param>
     46    /// <returns><c>null</c>.</returns>
    3547    public override IOperation Apply(IScope scope) {
    3648      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
     
    4052    }
    4153
     54    /// <summary>
     55    /// Manipulates the given real <paramref name="vector"/> with the given random number generator.
     56    /// </summary>
     57    /// <param name="scope">The current scope.</param>
     58    /// <param name="random">A random number generator.</param>
     59    /// <param name="vector">The real vector to manipulate.</param>
     60    /// <returns>The manipulated real vector.</returns>
    4261    protected abstract double[] Manipulate(IScope scope, IRandom random, double[] vector);
    4362  }
  • trunk/sources/HeuristicLab.RealVector/RealVectorMultiCrossoverBase.cs

    r111 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Base class for all real vector multiple crossover operators.
     32  /// </summary>
    3033  public abstract class RealVectorMultiCrossoverBase : MultiCrossoverBase {
     34    /// <summary>
     35    /// Initializes a new instance of <see cref="RealVectorMultiCrossoverBase"/> with one variable info
     36    /// (<c>RealVector</c>).
     37    /// </summary>
    3138    public RealVectorMultiCrossoverBase()
    3239      : base() {
     
    3441    }
    3542
     43    /// <summary>
     44    /// Performs a crossover of a number of given parents.
     45    /// </summary>
     46    /// <param name="scope">The current scope.</param>
     47    /// <param name="random">A random number generator.</param>
     48    /// <param name="parents">The parents for crossover.</param>
     49    /// <param name="child">The resulting child scope.</param>
    3650    protected sealed override void Cross(IScope scope, IRandom random, IScope[] parents, IScope child) {
    3751      IList<double[]> parentsList = new List<double[]>(parents.Length);
     
    4458    }
    4559
     60    /// <summary>
     61    /// Performs a crossover of a number of given parents.
     62    /// </summary>
     63    /// <param name="scope">The current scope.</param>
     64    /// <param name="random">A random number generator.</param>
     65    /// <param name="parents">The parents for crossover.</param>
     66    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    4667    protected abstract double[] Cross(IScope scope, IRandom random, IList<double[]> parents);
    4768  }
  • trunk/sources/HeuristicLab.RealVector/RealVectorSelfAdaptiveMultiCrossoverBase.cs

    r111 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Base class for self adaptive multiple crossovers for real vectors.
     32  /// </summary>
    3033  public abstract class RealVectorSelfAdaptiveMultiCrossoverBase : MultiCrossoverBase {
     34    /// <summary>
     35    /// Initializes a new instance of <see cref="RealVectorSelfAdaptiveMultiCrossoverBase"/> with two
     36    /// variable infos (<c>RealVector</c> and <c>StrategyVector</c>).
     37    /// </summary>
    3138    public RealVectorSelfAdaptiveMultiCrossoverBase()
    3239      : base() {
     
    3542    }
    3643
     44    /// <summary>
     45    /// Performs a self adaptive multiple crossover on the given list of <paramref name="parents"/>.
     46    /// </summary>
     47    /// <param name="scope">The current scope.</param>
     48    /// <param name="random">The random number generator.</param>
     49    /// <param name="parents">The list of parents of which to perform the crossover.</param>
     50    /// <param name="child">The newly generated real vector, resulting from the self adaptive multiple
     51    /// crossover.</param>
    3752    protected sealed override void Cross(IScope scope, IRandom random, IScope[] parents, IScope child) {
    3853      IList<double[]> parentsList = new List<double[]>(parents.Length);
     
    5065    }
    5166
     67    /// <summary>
     68    /// Performs a self adaptive multiple crossover on the given list of <paramref name="parents"/>.
     69    /// </summary>
     70    /// <param name="scope">The current scope.</param>
     71    /// <param name="random">The random number generator.</param>
     72    /// <param name="parents">The list of parents of which to perform the crossover.</param>
     73    /// <param name="strategyParametersList">The strategy parameter list.</param>
     74    /// <param name="childIndividual">Output parameter; the created child.</param>
     75    /// <param name="strategyParameters">Output parameter; endogenous strategy parameters.</param>
    5276    protected abstract void Cross(IScope scope, IRandom random, IList<double[]> parents, IList<double[]> strategyParametersList, out double[] childIndividual, out double[] strategyParameters);
    5377  }
  • trunk/sources/HeuristicLab.RealVector/SelfAdaptiveDiscreteMultiCrossover.cs

    r111 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Creates a new offspring by combining the alleles in the parents such that each allele is
     31  /// randomly selected from one parent. It will also use the same strategy to combine the endogenous
     32  /// strategy parameter vector.
     33  /// </summary>
    2934  public class SelfAdaptiveDiscreteMultiCrossover : RealVectorSelfAdaptiveMultiCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get {
     
    3440    }
    3541
     42    /// <summary>
     43    /// Performs a self adaptive discrete multiple crossover on the given list of <paramref name="parents"/>.
     44    /// </summary>
     45    /// <exception cref="InvalidOperationException">Thrown when the parent vectors have different lengths.</exception>
     46    /// <param name="random">The random number generator.</param>
     47    /// <param name="parents">The list of parents to crossover.</param>
     48    /// <param name="strategyParametersList">The strategy parameter list.</param>
     49    /// <param name="childIndividual">Output parameter; the created child.</param>
     50    /// <param name="strategyParameters">Output parameter; endogenous strategy parameters.</param>
    3651    public static void Apply(IRandom random, IList<double[]> parents, IList<double[]> strategyParametersList, out double[] childIndividual, out double[] strategyParameters) {
    3752      childIndividual = new double[parents[0].Length];
     
    4863    }
    4964
     65    /// <summary>
     66    /// Performs a self adaptive discrete multiple crossover on the given list of <paramref name="parents"/>.
     67    /// </summary>
     68    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     69    /// <param name="scope">The current scope.</param>
     70    /// <param name="random">The random number generator.</param>
     71    /// <param name="parents">The list of parents to crossover.</param>
     72    /// <param name="strategyParametersList">The strategy parameter list.</param>
     73    /// <param name="childIndividual">Output parameter; the created child.</param>
     74    /// <param name="strategyParameters">Output parameter; endogenous strategy parameters.</param>
    5075    protected override void Cross(IScope scope, IRandom random, IList<double[]> parents, IList<double[]> strategyParametersList, out double[] childIndividual, out double[] strategyParameters) {
    5176      Apply(random, parents, strategyParametersList, out childIndividual, out strategyParameters);
  • trunk/sources/HeuristicLab.RealVector/SelfAdaptiveNormalAllPositionsManipulator.cs

    r1180 r1184  
    2828
    2929namespace HeuristicLab.RealVector {
     30  /// <summary>
     31  /// Manipulates each dimension in the real vector with the mutation strength given
     32  /// in the strategy parameter vector.
     33  /// </summary>
    3034  public class SelfAdaptiveNormalAllPositionsManipulator : RealVectorManipulatorBase {
     35    /// <inheritdoc select="summary"/>
    3136    public override string Description {
    3237      get { return @"Manipulates each dimension in the real vector with the mutation strength given in the strategy parameter vector"; }
    3338    }
    3439
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="SelfAdaptiveNormalAllPositionsManipulator"/> with one
     42    /// variable info (<c>StrategyVector</c>).
     43    /// </summary>
    3544    public SelfAdaptiveNormalAllPositionsManipulator()
    3645      : base() {
     
    3847    }
    3948
     49    /// <summary>
     50    /// Performs a self adaptive normally distributed all position manipulation on the given
     51    /// <paramref name="vector"/>.
     52    /// </summary>
     53    /// <exception cref="InvalidOperationException">Thrown when the strategy vector is not
     54    /// as long as the vector to get manipulated.</exception>
     55    /// <param name="strategyParameters">The strategy vector determining the strength of the mutation.</param>
     56    /// <param name="random">A random number generator.</param>
     57    /// <param name="vector">The real vector to manipulate.</param>
     58    /// <returns>The manipulated real vector.</returns>
    4059    public static double[] Apply(double[] strategyParameters, IRandom random, double[] vector) {
    4160      NormalDistributedRandom N = new NormalDistributedRandom(random, 0.0, 1.0);
     
    4665    }
    4766
     67    /// <summary>
     68    /// Performs a self adaptive normally distributed all position manipulation on the given
     69    /// <paramref name="vector"/>.
     70    /// </summary>
     71    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     72    /// <param name="scope">The current scope.</param>
     73    /// <param name="random">A random number generator.</param>
     74    /// <param name="vector">The real vector to manipulate.</param>
     75    /// <returns>The manipulated real vector.</returns>
    4876    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    4977      double[] strategyVector = scope.GetVariableValue<DoubleArrayData>("StrategyVector", true).Data;
  • trunk/sources/HeuristicLab.RealVector/SinglePointCrossover.cs

    r2 r1184  
    2626
    2727namespace HeuristicLab.RealVector {
     28  /// <summary>
     29  /// Single point crossover for real vectors.
     30  /// </summary>
    2831  public class SinglePointCrossover : RealVectorCrossoverBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return "Single point crossover for real vectors."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Performs a single point crossover at a randomly chosen position of the two
     39    /// given parent real vectors.
     40    /// </summary>
     41    /// <param name="random">A random number generator.</param>
     42    /// <param name="parent1">The first parent for crossover.</param>
     43    /// <param name="parent2">The second parent for crossover.</param>
     44    /// <returns>The newly created real vector, resulting from the single point crossover.</returns>
    3345    public static double[] Apply(IRandom random, double[] parent1, double[] parent2) {
    3446      int length = parent1.Length;
     
    4456    }
    4557
     58    /// <summary>
     59    /// Performs a single point crossover at a randomly chosen position of the two
     60    /// given parent real vectors.
     61    /// </summary>
     62    /// <param name="scope">The current scope.</param>
     63    /// <param name="random">A random number generator.</param>
     64    /// <param name="parent1">The first parent for crossover.</param>
     65    /// <param name="parent2">The second parent for crossover.</param>
     66    /// <returns>The newly created real vector, resulting from the single point crossover.</returns>
    4667    protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) {
    4768      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.RealVector/UniformAllPositionsManipulator.cs

    r102 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Uniformly distributed change of all positions of a real vector.
     31  /// </summary>
    2932  public class UniformAllPositionsManipulator : RealVectorManipulatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return "Uniformly distributed change of all positions of a real vector."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Initializes a new instance of <see cref="UniformAllPositionsManipulator"/> with two variable infos
     40    /// (<c>Minimum</c> and <c>Maximum</c>).
     41    /// </summary>
    3442    public UniformAllPositionsManipulator() {
    3543      AddVariableInfo(new VariableInfo("Minimum", "Minimum of the sampling range for the vector element (included)", typeof(DoubleData), VariableKind.In));
     
    3745    }
    3846
     47    /// <summary>
     48    /// Changes all positions in the given real <paramref name="vector"/>.
     49    /// </summary>
     50    /// <param name="random">A random number generator.</param>
     51    /// <param name="vector">The real vector to manipulate.</param>
     52    /// <param name="min">The minimum value of the sampling range for each vector element (inclusive).</param>
     53    /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param>
     54    /// <returns>The new real vector which has been manipulated.</returns>
    3955    public static double[] Apply(IRandom random, double[] vector, double min, double max) {
    4056      double[] result = (double[])vector.Clone();
     
    4763    }
    4864
     65    /// <summary>
     66    /// Changes all positions in the given real <paramref name="vector"/>.
     67    /// </summary>
     68    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     69    /// <param name="scope">The current scope.</param>
     70    /// <param name="random">A random number generator.</param>
     71    /// <param name="vector">The real vector to manipulate.</param>
     72    /// <returns>The new real vector which has been manipulated.</returns>
    4973    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    5074      double min = GetVariableValue<DoubleData>("Minimum", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/UniformOnePositionManipulator.cs

    r2 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Uniformly distributed change of a single position of a real vector.
     31  /// </summary>
    2932  public class UniformOnePositionManipulator : RealVectorManipulatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return "Uniformly distributed change of a single position of a real vector."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Initializes a new instance of <see cref="UniformOnePositionManipulator"/> with two variable infos
     40    /// (<c>Minimum</c> and <c>Maximum</c>).
     41    /// </summary>
    3442    public UniformOnePositionManipulator() {
    3543      AddVariableInfo(new VariableInfo("Minimum", "Minimum of the sampling range for the vector element (included)", typeof(DoubleData), VariableKind.In));
     
    3745    }
    3846
     47    /// <summary>
     48    /// Changes randomly a single position in the given real <paramref name="vector"/>.
     49    /// </summary>
     50    /// <param name="random">A random number generator.</param>
     51    /// <param name="vector">The real vector to manipulate.</param>
     52    /// <param name="min">The minimum value of the sampling range for
     53    /// the vector element to change (inclusive).</param>
     54    /// <param name="max">The maximum value of the sampling range for
     55    /// the vector element to change (exclusive).</param>
     56    /// <returns>The new real vector that has been manipulated.</returns>
    3957    public static double[] Apply(IRandom random, double[] vector, double min, double max) {
    4058      double[] result = (double[])vector.Clone();
     
    4462    }
    4563
     64    /// <summary>
     65    /// Changes randomly a single position in the given real <paramref name="vector"/>.
     66    /// </summary>
     67    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     68    /// <param name="scope">The current scope.</param>
     69    /// <param name="random">A random number generator.</param>
     70    /// <param name="vector">The real vector to manipulate.</param>
     71    /// <returns>The new real vector that has been manipulated.</returns>
    4672    protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) {
    4773      double min = GetVariableValue<DoubleData>("Minimum", scope, true).Data;
  • trunk/sources/HeuristicLab.RealVector/UniformRandomRealVectorGenerator.cs

    r77 r1184  
    2727
    2828namespace HeuristicLab.RealVector {
     29  /// <summary>
     30  /// Generates a new random real vector with each element uniformly distributed in a specified range.
     31  /// </summary>
    2932  public class UniformRandomRealVectorGenerator : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return "Operator generating a new random real vector with each element uniformly distributed in a specified range."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Initializes a new instance of <see cref="UniformRandomRealVectorGenerator"/> with five variable infos
     40    /// (<c>Random</c>, <c>Length</c>, <c>Minimum</c>, <c>Maximum</c> and <c>RealVector</c>).
     41    /// </summary>
    3442    public UniformRandomRealVectorGenerator() {
    3543      AddVariableInfo(new VariableInfo("Random", "Pseudo random number generator", typeof(IRandom), VariableKind.In));
     
    4048    }
    4149
     50    /// <summary>
     51    /// Generates a new random real vector with the given <paramref name="length"/>.
     52    /// </summary>
     53    /// <param name="random">The random number generator.</param>
     54    /// <param name="length">The length of the real vector.</param>
     55    /// <param name="min">The minimum value of the sampling range for each vector element (inclusive).</param>
     56    /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param>
     57    /// <returns>The newly created real vector.</returns>
    4258    public static double[] Apply(IRandom random, int length, double min, double max) {
    4359      double[] result = new double[length];
     
    4763    }
    4864
     65    /// <summary>
     66    /// Generates a new random real vector and injects it in the given <paramref name="scope"/>.
     67    /// </summary>
     68    /// <param name="scope">The scope where to get the values from and where to inject the newly
     69    /// created real vector.</param>
     70    /// <returns><c>null</c>.</returns>
    4971    public override IOperation Apply(IScope scope) {
    5072      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
Note: See TracChangeset for help on using the changeset viewer.