Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1078 for branches


Ignore:
Timestamp:
01/07/09 13:09:55 (16 years ago)
Author:
abeham
Message:

Adding the ES documentation comments from the trunk to the 3.1 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/sources/HeuristicLab.ES/ES.cs

    r98 r1078  
    3535
    3636namespace HeuristicLab.ES {
     37  /// <summary>
     38  /// Class for the heuristic optimization technique "evolution strategy".
     39  /// </summary>
    3740  public class ES : ItemBase, IEditable {
    3841    #region Create Operators
     42    /// <summary>
     43    /// Creates a new evolution strategy.
     44    /// </summary>
     45    /// <param name="engine">The engine of the ES to create.</param>
    3946    public static void Create(IEngine engine) {
    4047      engine.OperatorGraph.Clear();
     
    373380    #region Properties
    374381    private IEngine myEngine;
     382    /// <summary>
     383    /// Gets the engine of the current instance.
     384    /// </summary>
    375385    public IEngine Engine {
    376386      get { return myEngine; }
    377387    }
    378388    private BoolData mySetSeedRandomly;
     389    /// <summary>
     390    /// Gets or sets the boolean flag whether to set the seed randomly or not.
     391    /// </summary>
    379392    public bool SetSeedRandomly {
    380393      get { return mySetSeedRandomly.Data; }
     
    382395    }
    383396    private IntData mySeed;
     397    /// <summary>
     398    /// Gets or sets the seed of the current instance.
     399    /// </summary>
     400    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
     401    /// in the setter.</remarks>
    384402    public int Seed {
    385403      get { return mySeed.Data; }
     
    390408    }
    391409    private IntData myMu;
     410    /// <summary>
     411    /// Gets or sets the µ value of the current instance.
     412    /// </summary>
     413    /// <remarks>Sets also the lambda and the rho value. Calls <see cref="ItemBase.OnChanged"/> of
     414    /// base class <see cref="ItemBase"/>.</remarks>
    392415    public int Mu {
    393416      get { return myMu.Data; }
     
    402425    }
    403426    private IntData myRho;
     427    /// <summary>
     428    /// Gets or sets the rho value of the current instance.
     429    /// </summary>
     430    /// <remarks>Sets also the µ value. Calls <see cref="ItemBase.OnChanged"/> of
     431    /// base class <see cref="ItemBase"/>.</remarks>
    404432    public int Rho {
    405433      get { return myRho.Data; }
     
    413441    }
    414442    private IntData myLambda;
     443    /// <summary>
     444    /// Gets or sets the lambda value of the current instance.
     445    /// </summary>
     446    /// <remarks>May also change the µ value under certain circumstances.
     447    /// Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>.</remarks>
    415448    public int Lambda {
    416449      get { return myLambda.Data; }
     
    434467    }
    435468    private BoolData myPlusNotation;
     469    /// <summary>
     470    /// Gets or sets the boolean flag whether it is a plus notation or not.
     471    /// </summary>
     472    /// <remarks>May also set the lambda value under certain circumstances.
     473    /// Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>.</remarks>
    436474    public bool PlusNotation {
    437475      get { return myPlusNotation.Data; }
     
    447485    }
    448486    private DoubleData myShakingFactor;
     487    /// <summary>
     488    /// Gets or sets the shaking factor of the current instance.
     489    /// </summary>
    449490    public double ShakingFactor {
    450491      get { return myShakingFactor.Data; }
     
    452493    }
    453494    private DoubleData mySuccessProbability;
     495   
    454496    private DoubleData myTargetSuccessProbability;
     497    /// <summary>
     498    /// Gets or sets the success probability.
     499    /// </summary>
     500    /// <remarks>Gets the target success probability and sets also the target success probability.</remarks>
    455501    public double SuccessProbability {
    456502      get { return myTargetSuccessProbability.Data; }
     
    461507    }
    462508    private DoubleData myLearningRate;
     509    /// <summary>
     510    /// Gets or sets the learning rate.
     511    /// </summary>
     512    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
     513    /// in the setter.</remarks>
    463514    public double LearningRate {
    464515      get { return myLearningRate.Data; }
     
    471522    }
    472523    private DoubleData myDampeningFactor;
     524    /// <summary>
     525    /// Gets or sets the dampening factor.
     526    /// </summary>
     527    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
     528    /// in the setter.</remarks>
    473529    public double DampeningFactor {
    474530      get { return myDampeningFactor.Data; }
     
    481537    }
    482538    private IntData myMaximumGenerations;
     539    /// <summary>
     540    /// Gets or sets the maximum number of generations.
     541    /// </summary>
    483542    public int MaximumGenerations {
    484543      get { return myMaximumGenerations.Data; }
     
    486545    }
    487546    private BoolData myUseSuccessRule;
     547    /// <summary>
     548    /// Gets or sets the boolean flag whether to use the success rule or not.
     549    /// </summary>
    488550    public bool UseSuccessRule {
    489551      get { return myUseSuccessRule.Data; }
     
    493555    private IOperator myESMain;
    494556    private IOperator myVariableInjection;
     557    /// <summary>
     558    /// Gets or sets the problem injection operator.
     559    /// </summary>
    495560    public IOperator ProblemInjector {
    496561      get { return myVariableInjection.SubOperators[0]; }
     
    503568    }
    504569    private IOperator myPopulationInitialization;
     570    /// <summary>
     571    /// Gets or sets the solution generation operator.
     572    /// </summary>
    505573    public IOperator SolutionGenerator {
    506574      get { return myPopulationInitialization.SubOperators[0]; }
     
    512580      }
    513581    }
     582    /// <summary>
     583    /// Gets or sets the evaluation operator.
     584    /// </summary>
    514585    public IOperator Evaluator {
    515586      get { return myPopulationInitialization.SubOperators[1]; }
     
    522593      }
    523594    }
     595    /// <summary>
     596    /// Gets or sets the mutation operator.
     597    /// </summary>
    524598    public IOperator Mutator {
    525599      get { return myESMain.SubOperators[0]; }
     
    531605      }
    532606    }
     607    /// <summary>
     608    /// Gets or sets the recombination operator.
     609    /// </summary>
    533610    public IOperator Recombinator {
    534611      get { return myESMain.SubOperators[2]; }
     
    542619    #endregion
    543620
     621    /// <summary>
     622    /// Initializes a new instance of <see cref="ES"/> having a <see cref="SequentialEngine"/> as engine.
     623    /// </summary>
    544624    public ES() {
    545625      myEngine = new SequentialEngine.SequentialEngine();
     
    548628    }
    549629
     630    /// <summary>
     631    /// Creates a new instance of <see cref="ESEditor"/> to display the current instance.
     632    /// </summary>
     633    /// <returns>The created view as <see cref="ESEditor"/>.</returns>
    550634    public override IView CreateView() {
    551635      return new ESEditor(this);
    552636    }
     637    /// <summary>
     638    /// Creates a new instance of <see cref="ESEditor"/> to display the current instance.
     639    /// </summary>
     640    /// <returns>The created editor as <see cref="ESEditor"/>.</returns>
    553641    public virtual IEditor CreateEditor() {
    554642      return new ESEditor(this);
    555643    }
    556644
     645    /// <summary>
     646    /// Clones the current instance (deep clone).
     647    /// </summary>
     648    /// <remarks>Uses <see cref="Auxiliary.Clone"/> method of the <see cref="Auxiliary"/> class to
     649    /// clone the engine.</remarks>
     650    /// <param name="clonedObjects">A dictionary of all already cloned objects.
     651    /// (Needed to avoid cycles.)</param>
     652    /// <returns>The cloned object as <see cref="ES"/>.</returns>
    557653    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    558654      ES clone = new ES();
     
    601697
    602698    #region Persistence Methods
     699    /// <summary>
     700    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     701    /// </summary>
     702    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.
     703    /// <br/>The engine of the current instance is saved as child node with tag name <c>Engine</c>.</remarks>
     704    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     705    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     706    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     707    /// (Needed to avoid cycles.)</param>
     708    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    603709    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    604710      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    606712      return node;
    607713    }
     714    /// <summary>
     715    /// Loads the persisted ES from the specified <paramref name="node"/>.
     716    /// </summary>
     717    /// <remarks>Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.<br/>
     718    /// The engine must be saved as child node with tag name <c>Engine</c> (see
     719    /// <see cref="GetXmlNode"/>).</remarks>
     720    /// <param name="node">The <see cref="XmlNode"/> where the value is saved.</param>
     721    /// <param name="restoredObjects">The dictionary of all already restored objects.
     722    /// (Needed to avoid cycles.)</param>
    608723    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    609724      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.