Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/28/08 10:32:20 (16 years ago)
Author:
vdorfer
Message:

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

Location:
trunk/sources/HeuristicLab.Permutation
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Permutation/AbsolutePositionTopologicalCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permutation arrays by taking
     31  /// the entries with the same index (starting at position 0) from both parents
     32  /// (minding already inserted values).
     33  /// </summary>
     34  /// <example>First take the value at position 0 from parent1 then take the value at position 0
     35  /// from parent2 if it has not already been inserted, afterwards take the value at position 1 from
     36  /// parent1 if it has not already been inserted, then from parent2 and so on.</example>
    2937  public class AbsolutePositionTopologicalCrossover : PermutationCrossoverBase {
     38    /// <inheritdoc select="summary"/>
    3039    public override string Description {
    3140      get { return @"TODO\r\nOperator description still missing ..."; }
    3241    }
    3342
     43    /// <summary>
     44    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     45    /// by taking the values from both parents one by one with the same index starting at position 0.
     46    /// </summary>
     47    /// <example>First take the value at position 0 from parent1 then take the value at position 0
     48    /// from parent2 if it has not already been inserted, afterwards take the value at position 1 from
     49    /// parent1 if it has not already been inserted, then from parent2 and so on.</example>
     50    /// <param name="random">A random number generator.</param>
     51    /// <param name="parent1">The parent scope 1 to cross over.</param>
     52    /// <param name="parent2">The parent scope 2 to cross over.</param>
     53    /// <returns>The created cross over permutation as int array.</returns>
    3454    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3555      int length = parent1.Length;
     
    5474    }
    5575
     76    /// <summary>
     77    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     78    /// by taking the values from both parents one by one with the same index.
     79    /// </summary>
     80    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     81    /// <param name="scope">The current scope.</param>
     82    /// <param name="random">A random number generator.</param>
     83    /// <param name="parent1">The parent scope 1 to cross over.</param>
     84    /// <param name="parent2">The parent scope 2 to cross over.</param>
     85    /// <returns>The created cross over permutation as int array.</returns>
    5686    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    5787      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/CosaCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permutation arrays by taking randomly chosen
     31  /// reverse and forward intervals from the first permutation array inserting
     32  /// it in the child on different positions depending on the second permutation array.
     33  /// </summary>
    2934  public class CosaCrossover : PermutationCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return @"TODO\r\nOperator description still missing ..."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     42    /// by taking first the reverse elements of a randomly chosen interval of parent1
     43    /// and inserting it in the result at a position specified by the permutation of parent2.
     44    /// The remaining elements to be inserted are taken again from parent1 in the forward direction.
     45    /// </summary>
     46    /// <param name="random">The random number generator.</param>
     47    /// <param name="parent1">The parent scope 1 to cross over.</param>
     48    /// <param name="parent2">The parent scope 2 to cross over.</param>
     49    /// <returns>The created cross over permutation as int array.</returns>
    3450    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3551      int length = parent1.Length;
     
    6985    }
    7086
     87    /// <summary>
     88    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     89    /// by taking first the reverse elements of a randomly chosen interval of parent1
     90    /// and inserting it in the result at a position specified by the permutation of parent2.
     91    /// The remaining elements to be inserted are taken again from parent1 in the forward direction.
     92    /// </summary>
     93    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     94    /// <param name="scope">The current scope.</param>
     95    /// <param name="random">The random number generator.</param>
     96    /// <param name="parent1">The parent scope 1 to cross over.</param>
     97    /// <param name="parent2">The parent scope 2 to cross over.</param>
     98    /// <returns>The created cross over permutation as int array.</returns>
    7199    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    72100      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/CyclicCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two int arrays by taking first a whole cycle and then the
     31  /// missing ones from the second parent.
     32  /// </summary>
     33  /// <remarks>A whole cycle means: <br/>
     34  /// Start at a randomly chosen position x in parent1 and transfer it to the child at the same position.
     35  /// Now this position x is no longer available for the node on position x in parent2, so
     36  /// the value of the node at position x in parent2 is searched in parent1 and is then transferred
     37  /// to the child preserving the position. Now this new position y is no longer available for the node in parent2 ....<br/>
     38  /// This procedure is repeated till it is again at position x, then the cycle is over.
     39  /// </remarks>
    2940  public class CyclicCrossover : PermutationCrossoverBase {
     41    /// <inheritdoc select="summary"/>
    3042    public override string Description {
    3143      get { return @"TODO\r\nOperator description still missing ..."; }
    3244    }
    3345
     46    /// <summary>
     47    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     48    /// by copying a whole cycle starting at a randomly chosen position in parent1 and taking the rest
     49    /// from parent2.
     50    /// </summary>
     51    /// <param name="random">The random number generator.</param>
     52    /// <param name="parent1">The parent scope 1 to cross over.</param>
     53    /// <param name="parent2">The parent scope 2 to cross over.</param>
     54    /// <returns>The created cross over permutation as int array.</returns>
    3455    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3556      int length = parent1.Length;
     
    5879    }
    5980
     81    /// <summary>
     82    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     83    /// by copying a whole cycle starting at a randomly chosen position in parent1 and taking the rest
     84    /// from parent2.
     85    /// </summary>
     86    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     87    /// <param name="scope">The current scope.</param>
     88    /// <param name="random">The random number generator.</param>
     89    /// <param name="parent1">The parent scope 1 to cross over.</param>
     90    /// <param name="parent2">The parent scope 2 to cross over.</param>
     91    /// <returns>The created cross over permutation as int array.</returns>
    6092    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    6193      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/EdgeRecombinationCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permutation arrays by calculating the edges (neighbours)
     31  /// of each element. Starts at a randomly chosen position, the next element is a neighbour with the least
     32  /// number of neighbours, the next again a neighbour and so on.
     33  /// </summary>
    2934  public class EdgeRecombinationCrossover : PermutationCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return @"TODO\r\nOperator description still missing ..."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="2"/>
     42    /// by calculating the edges of each element. Starts at a randomly chosen position,
     43    /// the next element is a neighbour with the least
     44    /// number of neighbours, the next again a neighbour and so on.
     45    /// </summary>
     46    /// <exception cref="InvalidOperationException">Thrown when the permutation lacks a number.
     47    /// </exception>
     48    /// <param name="random">The random number generator.</param>
     49    /// <param name="parent1">The parent scope 1 to cross over.</param>
     50    /// <param name="parent2">The parent scope 2 to cross over.</param>
     51    /// <returns>The created cross over permutation as int array.</returns>
    3452    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3553      int length = parent1.Length;
     
    120138    }
    121139
     140    /// <summary>
     141    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="2"/>
     142    /// by calculating the edges of each element. Starts at a randomly chosen position,
     143    /// the next element is a neighbour with the least
     144    /// number of neighbours, the next again a neighbour and so on.
     145    /// </summary>
     146    /// <exception cref="InvalidOperationException">Thrown when the permutation lacks a number.
     147    /// </exception>
     148    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     149    /// <param name="scope">The current scope.</param>
     150    /// <param name="random">The random number generator.</param>
     151    /// <param name="parent1">The parent scope 1 to cross over.</param>
     152    /// <param name="parent2">The parent scope 2 to cross over.</param>
     153    /// <returns>The created cross over permutation as int array.</returns>
    122154    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    123155      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/HeuristicLabPermutationPlugin.cs

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

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by moving randomly one element to another position in the array.
     30  /// </summary>
    2831  public class InsertionManipulator : PermutationManipulatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return @"TODO\r\nOperator description still missing ..."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Moves an randomly chosen element in the specified <paramref name="permutation"/> array
     39    /// to another randomly generated position.
     40    /// </summary>
     41    /// <param name="random">The random number generator.</param>
     42    /// <param name="permutation">The array to manipulate.</param>
     43    /// <returns>The new permuation array with the manipulated data.</returns>
    3344    public static int[] Apply(IRandom random, int[] permutation) {
    3445      int[] result = (int[])permutation.Clone();
     
    5869    }
    5970
     71    /// <summary>
     72    /// Moves an randomly chosen element in the specified <paramref name="permutation"/> array
     73    /// to another randomly generated position.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     76    /// <param name="scope">The current scope.</param>
     77    /// <param name="random">The random number generator.</param>
     78    /// <param name="permutation">The array to manipulate.</param>
     79    /// <returns>The new permuation array with the manipulated data.</returns>
    6080    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    6181      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/InversionManipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by reversing a randomly chosen interval.
     30  /// </summary>
    2831  public class InversionManipulator : PermutationManipulatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return @"TODO\r\nOperator description still missing ..."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Reverses the specified <paramref name="permutation"/> between two randomly generated positions.
     39    /// </summary>
     40    /// <param name="random">The random number generator.</param>
     41    /// <param name="permutation">The permutation array to manipulate.</param>
     42    /// <returns>The new permuation array with the manipulated data.</returns>
    3343    public static int[] Apply(IRandom random, int[] permutation) {
    3444      int[] result = (int[])permutation.Clone();
     
    4757    }
    4858
     59    /// <summary>
     60    /// Reverses the specified <paramref name="permutation"/> between two randomly generated positions.
     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="permutation">The permutation array to manipulate.</param>
     66    /// <returns>The new permuation array with the manipulated data.</returns>
    4967    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    5068      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/MaximalPreservativeCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permuation arrays by preserving a preferably big
     31  /// region from one permutation array.
     32  /// </summary>
    2933  public class MaximalPreservativeCrossover : PermutationCrossoverBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return @"TODO\r\nOperator description still missing ..."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     41    /// by preserving a preferably big randomly chosen region of one permutation and taking
     42    /// the missing ones from the other permuation array.
     43    /// </summary>
     44    /// <param name="random">The random number generator.</param>
     45    /// <param name="parent1">The permutation array of parent 1.</param>
     46    /// <param name="parent2">The permutation array of parent 2.</param>
     47    /// <returns>The created cross over permutation as int array.</returns>
    3448    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3549      int length = parent1.Length;
     
    6377    }
    6478
     79    /// <summary>
     80    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     81    /// by preserving a big randomly chosen region of one permutation and taking the missing ones from the other
     82    /// permuation array.
     83    /// </summary>
     84    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     85    /// <param name="scope">The current scope.</param>
     86    /// <param name="random">The random number generator.</param>
     87    /// <param name="parent1">The permutation array of parent 1.</param>
     88    /// <param name="parent2">The permutation array of parent 2.</param>
     89    /// <returns>The created cross over permutation as int array.</returns>
    6590    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    6691      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/OrderBasedCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation of two permutation arrays by taking randomly a selection of values
     31  /// (not an interval!) from the first permutation keeping the correct order and filling
     32  /// the missing entries with the elements from the second permutation, also in the right order.
     33  /// </summary>
    2934  public class OrderBasedCrossover : PermutationCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return @"TODO\r\nOperator description still missing ..."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> by
     42    /// randomly selecting some values from the first permutation that will be inserted one after each
     43    /// other; the missing ones are picked in the correct order from the second permutation.
     44    /// </summary>
     45    /// <param name="random">The random number generator.</param>
     46    /// <param name="parent1">The parent scope 1 to cross over.</param>
     47    /// <param name="parent2">The parent scope 2 to cross over.</param>
     48    /// <returns>The created cross over permutation as int array.</returns>
    3449    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3550      int length = parent1.Length;
     
    7691    }
    7792
     93    /// <summary>
     94    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> by
     95    /// randomly selecting some values from the first permutation that will be inserted one after each
     96    /// other; the missing ones are picked in the correct order from the second permutation.
     97    /// </summary>
     98    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     99    /// <param name="scope">The current scope.</param>
     100    /// <param name="random">The random number generator.</param>
     101    /// <param name="parent1">The parent scope 1 to cross over.</param>
     102    /// <param name="parent2">The parent scope 2 to cross over.</param>
     103    /// <returns>The created cross over permutation as int array.</returns>
    78104    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    79105      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/OrderCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permuation arrays
     31  /// by taking a randomly chosen interval from the frist, preserving the positions,
     32  /// then the missing values from the second array in the order they occur in the second array.
     33  /// </summary>
    2934  public class OrderCrossover : PermutationCrossoverBase {
     35    /// <inheritdoc select="summary"/>
    3036    public override string Description {
    3137      get { return @"TODO\r\nOperator description still missing ..."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Performs a cross over permutation of <paramref name="parent1"/> and
     42    /// <paramref name="parent2"/> by taking a randomly chosen interval from <paramref name="parent1"/>,
     43    /// preserving the positions and then the missing values from <paramref name="parent2"/> in the
     44    /// order they occur in <paramref name="parent2"/>.
     45    /// </summary>
     46    /// <param name="random">The random number generator.</param>
     47    /// <param name="parent1">The parent scope 1 to cross over.</param>
     48    /// <param name="parent2">The parent scope 2 to cross over.</param>
     49    /// <returns>The created cross over permutation as int array.</returns>
    3450    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3551      int[] result = new int[parent1.Length];
     
    5773    }
    5874
     75    /// <summary>
     76    /// Performs a cross over permuation of <paramref name="parent1"/> and <paramref name="parent2"/>
     77    /// by taking a randomly chosen interval from <paramref name="parent1"/> and the rest from
     78    /// <paramref name="parent2"/>.
     79    /// </summary>
     80    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     81    /// <param name="scope">The current scope.</param>
     82    /// <param name="random">The random number generator.</param>
     83    /// <param name="parent1">The parent scope 1 to cross over.</param>
     84    /// <param name="parent2">The parent scope 2 to cross over.</param>
     85    /// <returns>The created cross over permutation as int array.</returns>
    5986    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    6087      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/PartiallyMatchedCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permuation arrays
     31  /// by taking a randomly chosen interval from the first, keeping the position,
     32  /// then all positions from the second permutation which are still free in the child
     33  /// (the position is free and the value is "free")
     34  /// and then missing ones from the second array in the order they occur in the second array.
     35  /// </summary>
    2936  public class PartiallyMatchedCrossover : PermutationCrossoverBase {
     37    /// <inheritdoc select="summary"/>
    3038    public override string Description {
    3139      get { return @"TODO\r\nOperator description still missing ..."; }
    3240    }
    3341
     42    /// <summary>
     43    /// Performs a cross over permuation of <paramref name="parent1"/> and <paramref name="parent2"/>
     44    /// by taking a randomly chosen interval from <paramref name="parent1"/>, preserving the position,
     45    /// then all positions from <paramref name="parent2"/> which are still free in the child
     46    /// (the position is free and the value is "free")
     47    /// and then missing ones from <paramref name="parent2"/> in the order they occur
     48    /// in <paramref name="parent2"/>.
     49    /// </summary>
     50    /// <param name="random">The random number generator.</param>
     51    /// <param name="parent1">The parent scope 1 to cross over.</param>
     52    /// <param name="parent2">The parent scope 2 to cross over.</param>
     53    /// <returns>The created cross over permutation as int array.</returns>
    3454    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3555      int length = parent1.Length;
     
    6686    }
    6787
     88    /// <summary>
     89    /// Performs a cross over permuation of <paramref name="parent1"/> and <paramref name="parent2"/>
     90    /// by taking a randomly chosen interval from <paramref name="parent1"/>, preserving the position,
     91    /// then all positions from <paramref name="parent2"/> which are still free in the child
     92    /// (the position is free and the value is "free")
     93    /// and then missing ones from <paramref name="parent2"/> in the order they occur
     94    /// in <paramref name="parent2"/>.
     95    /// </summary>
     96    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     97    /// <param name="scope">The current scope.</param>
     98    /// <param name="random">The random number generator.</param>
     99    /// <param name="parent1">The parent scope 1 to cross over.</param>
     100    /// <param name="parent2">The parent scope 2 to cross over.</param>
     101    /// <returns>The created cross over permutation as int array.</returns>
    68102    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    69103      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/Permutation.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// The base class for a permutation, which is an ordered combination.
     31  /// </summary>
    2932  public class Permutation : IntArrayData {
     33    /// <summary>
     34    /// Initializes a new instance of <see cref="Permutation"/>.
     35    /// </summary>
    3036    public Permutation()
    3137      : base() {
    3238    }
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="Permutation"/> with the given
     41    /// <paramref name="permutation"/> array.
     42    /// </summary>
     43    /// <param name="permutation">The permutation array to assign.</param>
    3344    public Permutation(int[] permutation)
    3445      : base(permutation) {
    3546    }
    3647
     48    /// <summary>
     49    /// Clones the current instance.
     50    /// </summary>
     51    /// <param name="clonedObjects">A dictionary of all already cloned objects. (Needed to
     52    /// avoid cycles.)</param>
     53    /// <returns>The cloned object as <see cref="Permutation"/>.</returns>
    3754    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    3855      Permutation clone = new Permutation((int[])Data.Clone());
  • trunk/sources/HeuristicLab.Permutation/PermutationCrossoverBase.cs

    r77 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Base class for cross over permutations.
     31  /// </summary>
    2932  public abstract class PermutationCrossoverBase : CrossoverBase {
     33    /// <summary>
     34    /// Initializes a new instance of <see cref="PermutationCrossoverBase"/> with one variable info
     35    /// (<c>Permutation</c>).
     36    /// </summary>
    3037    public PermutationCrossoverBase()
    3138      : base() {
     
    3340    }
    3441
     42    /// <summary>
     43    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> with
     44    /// the given random number generator (<paramref name="random"/>) to create a new
     45    /// <paramref name="child"/>.
     46    /// </summary>
     47    /// <exception cref="InvalidOperationException">Thrown when the two permutations have a different
     48    /// length.</exception>
     49    /// <remarks>Calls <see cref="Cross(HeuristicLab.Core.IScope, HeuristicLab.Core.IRandom, int[], int[])"/>.</remarks>
     50    /// <param name="scope">The scope where to get the actual child variable name.</param>
     51    /// <param name="random">The random number generator.</param>
     52    /// <param name="parent1">The parent scope 1 to cross over.</param>
     53    /// <param name="parent2">The parent scope 2 to cross over.</param>
     54    /// <param name="child">The child scope which to assign the permutated data.</param>
    3555    protected sealed override void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child) {
    3656      Permutation perm1 = parent1.GetVariableValue<Permutation>("Permutation", false);
     
    4363    }
    4464
     65    /// <summary>
     66    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> with
     67    /// the given random number generator (<paramref name="random"/>) .
     68    /// </summary>
     69    /// <param name="scope">The scope of the variables.</param>
     70    /// <param name="random">The random number generator.</param>
     71    /// <param name="parent1">The parent scope 1 to cross over.</param>
     72    /// <param name="parent2">The parent scope 2 to cross over.</param>
     73    /// <returns>The created cross over permutation as int array.</returns>
    4574    protected abstract int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2);
    4675  }
  • trunk/sources/HeuristicLab.Permutation/PermutationManipulatorBase.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Base class for manipulation permutation.
     30  /// </summary>
    2831  public abstract class PermutationManipulatorBase : OperatorBase {
     32    /// <summary>
     33    /// Initializes a new instance of <see cref="PermutationManipulatorBase"/> with two variable infos
     34    /// (<c>Random</c> and <c>Permutation</c>).
     35    /// </summary>
    2936    public PermutationManipulatorBase()
    3037      : base() {
     
    3340    }
    3441
     42    /// <summary>
     43    /// Manipulates the permutation data of the given <paramref name="scope"/> according to a
     44    /// specified random number generator.
     45    /// </summary>
     46    /// <remarks>Calls <see cref="Manipulate"/>.</remarks>
     47    /// <param name="scope">The scope of the permutation data and the random number generator.</param>
     48    /// <returns><c>null</c>.</returns>
    3549    public override IOperation Apply(IScope scope) {
    3650      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
     
    4054    }
    4155
     56    /// <summary>
     57    /// Manipulates the given <paramref name="permutation"/> with the specified <paramref name="random"/>
     58    /// number generator.
     59    /// </summary>
     60    /// <param name="scope">The scope of the variables.</param>
     61    /// <param name="random">The random number generator.</param>
     62    /// <param name="permutation">The permutation to manipulate.</param>
     63    /// <returns>The manipulated permutation as int array.</returns>
    4264    protected abstract int[] Manipulate(IScope scope, IRandom random, int[] permutation);
    4365  }
  • trunk/sources/HeuristicLab.Permutation/PositionBasedCrossover.cs

    r2 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Performs a cross over permutation between two permutation arrays based on randomly chosen positions.
     31  /// </summary>
    2932  public class PositionBasedCrossover : PermutationCrossoverBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     40    /// based on randomly chosen positions to define which position to take from where.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="parent1">The permutation array of parent 1.</param>
     44    /// <param name="parent2">The permutation array of parent 2.</param>
     45    /// <returns>The created cross over permutation as int array.</returns>
    3446    public static int[] Apply(IRandom random, int[] parent1, int[] parent2) {
    3547      int length = parent1.Length;
     
    6577    }
    6678
     79    /// <summary>
     80    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
     81    /// based on randomly chosen positions to define which position to take from where.
     82    /// </summary>
     83    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     84    /// <param name="scope">The current scope.</param>
     85    /// <param name="random">The random number generator.</param>
     86    /// <param name="parent1">The permutation array of parent 1.</param>
     87    /// <param name="parent2">The permutation array of parent 2.</param>
     88    /// <returns>The created cross over permutation as int array.</returns>
    6789    protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) {
    6890      return Apply(random, parent1, parent2);
  • trunk/sources/HeuristicLab.Permutation/RandomPermutationGenerator.cs

    r77 r850  
    2727
    2828namespace HeuristicLab.Permutation {
     29  /// <summary>
     30  /// Generates a randomly shuffled permuation.
     31  /// </summary>
    2932  public class RandomPermutationGenerator : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Initializes a new instance of <see cref="RandomPermutationGenerator"/> with three variable infos
     40    /// (<c>Length</c>, <c>Random</c> and <c>Permutation</c>).
     41    /// </summary>
    3442    public RandomPermutationGenerator()
    3543      : base() {
     
    3947    }
    4048
     49    /// <summary>
     50    /// Generates a randomly shuffled permutation.
     51    /// </summary>
     52    /// <param name="random">The random number generator.</param>
     53    /// <param name="length">The length of the permutation to create.</param>
     54    /// <returns>The generated permuation as int array.</returns>
    4155    public static int[] Apply(IRandom random, int length) {
    4256      int[] perm = new int[length];
     
    5670    }
    5771
     72    /// <summary>
     73    /// Generates a randomly shuffled permutation.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="Apply(HeuristicLab.Core.IRandom, int)"/>.</remarks>
     76    /// <param name="scope">The current scope with the variables.</param>
     77    /// <returns><c>null</c>.</returns>
    5878    public override IOperation Apply(IScope scope) {
    5979      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
  • trunk/sources/HeuristicLab.Permutation/ScrambleManipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by randomly scrambling the elements in a randomly chosen interval.
     30  /// </summary>
    2831  public class ScrambleManipulator : PermutationManipulatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return @"TODO\r\nOperator description still missing ..."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Mixes the elements of the given <paramref name="permutation"/> randomly
     39    /// in a randomly chosen interval.
     40    /// </summary>
     41    /// <param name="random">The random number generator.</param>
     42    /// <param name="permutation">The permutation array to manipulate.</param>
     43    /// <returns>The new permuation array with the manipulated data.</returns>
    3344    public static int[] Apply(IRandom random, int[] permutation) {
    3445      int[] result = (int[])permutation.Clone();
     
    6778    }
    6879
     80    /// <summary>
     81    /// Mixes the elements of the given <paramref name="permutation"/> randomly
     82    /// in a randomly chosen interval.
     83    /// </summary>
     84    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     85    /// <param name="scope">The current scope.</param>
     86    /// <param name="random">The random number generator.</param>
     87    /// <param name="permutation">The permutation array to manipulate.</param>
     88    /// <returns>The new permuation array with the manipulated data.</returns>
    6989    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    7090      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/Swap2Manipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by swapping to randomly chosen elements.
     30  /// </summary>
    2831  public class Swap2Manipulator : PermutationManipulatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return @"TODO\r\nOperator description still missing ..."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Swaps two randomly chosen elements in the given <paramref name="permutation"/> array.
     39    /// </summary>
     40    /// <param name="random">The random number generator.</param>
     41    /// <param name="permutation">The permutation array to manipulate.</param>
     42    /// <returns>The new permuation array with the manipulated data.</returns>
    3343    public static int[] Apply(IRandom random, int[] permutation) {
    3444      int[] result = (int[])permutation.Clone();
     
    4555    }
    4656
     57    /// <summary>
     58    /// Swaps two randomly chosen elements in the given <paramref name="permutation"/> array.
     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="permutation">The permutation array to manipulate.</param>
     64    /// <returns>The new permuation array with the manipulated data.</returns>
    4765    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    4866      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/Swap3Manipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by swaping three randomly chosen elements.
     30  /// </summary>
    2831  public class Swap3Manipulator : PermutationManipulatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return @"TODO\r\nOperator description still missing ..."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Swaps three randomly chosen elements of the given <paramref name="permutation"/> array.
     39    /// </summary>
     40    /// <param name="random">The random number generator.</param>
     41    /// <param name="permutation">The permutation array to manipulate.</param>
     42    /// <returns>The new permuation array with the manipulated data.</returns>
    3343    public static int[] Apply(IRandom random, int[] permutation) {
    3444      int[] result = (int[])permutation.Clone();
     
    6171    }
    6272
     73    /// <summary>
     74    /// Swaps three randomly chosen elements of the given <paramref name="permutation"/> array.
     75    /// </summary>
     76    /// <remarks>Calls <see cref="Apply"/>.</remarks>
     77    /// <param name="scope">The current scope.</param>
     78    /// <param name="random">The random number generator.</param>
     79    /// <param name="permutation">The permutation array to manipulate.</param>
     80    /// <returns>The new permuation array with the manipulated data.</returns>
    6381    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    6482      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/TranslocationInversionManipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by moving and reversing a randomly chosen interval of elements to another
     30  /// (randomly chosen) position in the array.
     31  /// </summary>
    2832  public class TranslocationInversionManipulator : PermutationManipulatorBase {
     33    /// <inheritdoc select="summary"/>
    2934    public override string Description {
    3035      get { return @"TODO\r\nOperator description still missing ..."; }
    3136    }
    3237
     38    /// <summary>
     39    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
     40    /// <paramref name="permutation"/> array and reverses it.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="permutation">The permutation array to manipulate.</param>
     44    /// <returns>The new permuation array with the manipulated data.</returns>
    3345    public static int[] Apply(IRandom random, int[] permutation) {
    3446      int[] result = (int[])permutation.Clone();
     
    6476    }
    6577
     78    /// <summary>
     79    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
     80    /// <paramref name="permutation"/> array and reverses it.
     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="permutation">The permutation array to manipulate.</param>
     86    /// <returns>The new permuation array with the manipulated data.</returns>
    6687    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    6788      return Apply(random, permutation);
  • trunk/sources/HeuristicLab.Permutation/TranslocationManipulator.cs

    r2 r850  
    2626
    2727namespace HeuristicLab.Permutation {
     28  /// <summary>
     29  /// Manipulates a permutation array by moving a randomly chosen interval of elements to another
     30  /// (randomly chosen) position in the array.
     31  /// </summary>
    2832  public class TranslocationManipulator : PermutationManipulatorBase {
     33    /// <inheritdoc select="summary"/>
    2934    public override string Description {
    3035      get { return @"TODO\r\nOperator description still missing ..."; }
    3136    }
    3237
     38    /// <summary>
     39    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
     40    /// <paramref name="permutation"/> array.
     41    /// </summary>
     42    /// <param name="random">The random number generator.</param>
     43    /// <param name="permutation">The permutation array to manipulate.</param>
     44    /// <returns>The new permuation array with the manipulated data.</returns>
    3345    public static int[] Apply(IRandom random, int[] permutation) {
    3446      int[] result = (int[])permutation.Clone();
     
    6476    }
    6577
     78    /// <summary>
     79    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
     80    /// <paramref name="permutation"/> array.
     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="permutation">The permutation array to manipulate.</param>
     86    /// <returns>The new permuation array with the manipulated data.</returns>
    6687    protected override int[] Manipulate(IScope scope, IRandom random, int[] permutation) {
    6788      return Apply(random, permutation);
Note: See TracChangeset for help on using the changeset viewer.