Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/26/08 10:29:34 (16 years ago)
Author:
vdorfer
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/ProportionalSelector.cs

    r772 r817  
    2727
    2828namespace HeuristicLab.Selection {
     29  /// <summary>
     30  /// Copies or moves a number of sub scopes from a source scope to a target scope, their probability
     31  /// to be selected depending on their quality.
     32  /// </summary>
    2933  public class ProportionalSelector : StochasticSelectorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return @"TODO\r\nOperator description still missing ..."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="ProportionalSelector"/> with three variable infos
     41    /// (<c>Maximization</c>, <c>Quality</c> and <c>Windowing</c>, being a local variable and initialized
     42    /// with <c>true</c>) and the <c>CopySelected</c> flag set to <c>true</c>.
     43    /// </summary>
    3444    public ProportionalSelector() {
    3545      AddVariableInfo(new VariableInfo("Maximization", "Maximization problem", typeof(BoolData), VariableKind.In));
     
    4151    }
    4252
     53    /// <summary>
     54    /// Copies or movies a number of sub scopes (<paramref name="selected"/>) in the given
     55    /// <paramref name="source"/> to the given <paramref name="target"/>, selection takes place with respect
     56    /// to the quality of the scope.
     57    /// </summary>
     58    /// <param name="random">The random number generator.</param>
     59    /// <param name="source">The source scope from where to copy/move the sub scopes.</param>
     60    /// <param name="selected">The number of sub scopes to copy/move.</param>
     61    /// <param name="target">The target scope where to add the sub scopes.</param>
     62    /// <param name="copySelected">Boolean flag whether the sub scopes shall be moved or copied.</param>
    4363    protected override void Select(IRandom random, IScope source, int selected, IScope target, bool copySelected) {
    4464      bool maximization = GetVariableValue<BoolData>("Maximization", source, true).Data;
     
    7494    }
    7595
     96    /// <summary>
     97    /// Calculates the qualities of the sub scopes of the given <paramref name="source"/>.
     98    /// </summary>
     99    /// <exception cref="InvalidOperationException">Thrown when the sub scopes are not sorted according
     100    /// to their solution qualities or if the quality value is beyond zero and the <c>windowing</c>
     101    /// flag is set to <c>false</c>.</exception>
     102    /// <param name="source">The scource scope where to calculate the qualities.</param>
     103    /// <param name="maximization">Boolean flag whether is a maximization problem.</param>
     104    /// <param name="qualityInfo">The quality variable info.</param>
     105    /// <param name="windowing">Boolean flag whether the windowing strategy shall be applied.</param>
     106    /// <param name="qualities">Output parameter; contains all qualities of the sub scopes.</param>
     107    /// <param name="qualitySum">Output parameter; the sum of all qualities.</param>
    76108    private void GenerateQualitiesArray(IScope source, bool maximization, IVariableInfo qualityInfo, bool windowing, out double[] qualities, out double qualitySum) {
    77109      int subScopes = source.SubScopes.Count;
Note: See TracChangeset for help on using the changeset viewer.