Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/08 09:01:27 (15 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.ES namespace and changed documentation of some Description properties (#331)

Location:
trunk/sources/HeuristicLab.ES
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ES/ES.cs

    r98 r896  
    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);
  • trunk/sources/HeuristicLab.ES/ESEditor.cs

    r98 r896  
    3131
    3232namespace HeuristicLab.ES {
     33  /// <summary>
     34  /// Class for visual representation of an <see cref="ES"/>.
     35  /// </summary>
    3336  public partial class ESEditor : EditorBase {
    3437    private ChooseOperatorDialog chooseOperatorDialog;
    3538
     39    /// <summary>
     40    /// Gets or sets the evolution strategy to display.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="EditorBase"/>.
     43    /// No own data storage present.</remarks>
    3644    public ES ES {
    3745      get { return (ES)Item; }
     
    3947    }
    4048
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="ESEditor"/>.
     51    /// </summary>
    4152    public ESEditor() {
    4253      InitializeComponent();
    4354    }
     55    /// <summary>
     56    /// Initializes a new instance of <see cref="ESEditor"/> with the given <paramref name="es"/>.
     57    /// </summary>
     58    /// <param name="es">The evolution strategy to display.</param>
    4459    public ESEditor(ES es)
    4560      : this() {
     
    4762    }
    4863
     64    /// <summary>
     65    /// Removes all event handlers from the underlying <see cref="ES"/>.
     66    /// </summary>
     67    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="EditorBase"/>.</remarks>
    4968    protected override void RemoveItemEvents() {
    5069      ES.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
     
    5473      base.RemoveItemEvents();
    5574    }
     75    /// <summary>
     76    /// Adds event handlers to the underlying <see cref="ES"/>.
     77    /// </summary>
     78    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="EditorBase"/>.</remarks>
    5679    protected override void AddItemEvents() {
    5780      base.AddItemEvents();
     
    7295    }
    7396
     97    /// <summary>
     98    /// Updates all controls with the latest data of the model.
     99    /// </summary>
     100    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="EditorBase"/>.</remarks>
    74101    protected override void UpdateControls() {
    75102      base.UpdateControls();
  • trunk/sources/HeuristicLab.ES/ESRandomSelector.cs

    r86 r896  
    2828
    2929namespace HeuristicLab.ES {
     30  /// <summary>
     31  /// Selects rho*lambda individuals with each rho successing individuals being selected
     32  /// from the parent population without repetitions.
     33  /// </summary>
    3034  public class ESRandomSelector : OperatorBase {
     35    /// <inheritdoc select="summary"/>
    3136    public override string Description {
    3237      get {
     
    3540    }
    3641
     42    /// <summary>
     43    /// Initializes a new instance of <see cref="ESRandomSelector"/> with three variable infos
     44    /// (<c>Random</c>, <c>Lambda</c> and <c>Rho</c>).
     45    /// </summary>
    3746    public ESRandomSelector()
    3847      : base() {
     
    4251    }
    4352
     53    /// <summary>
     54    /// Separates the sub scopes of the given <paramref name="scope"/> in <c>Selected</c> and
     55    /// <c>Remaining</c> and selects rho*lambda individuals with each rho successing individuals
     56    /// being selected from the parent population without repetitions.
     57    /// </summary>
     58    /// <param name="scope">The current scope where to perform the selection.</param>
     59    /// <returns><c>null</c>.</returns>
    4460    public override IOperation Apply(IScope scope) {
    4561      IScope source = new Scope("Remaining");
     
    5874    }
    5975
     76    /// <summary>
     77    /// Selects rho*lambda individuals with each rho successing individuals being selected
     78    /// from the parent population (<paramref name="source"/>) without repetitions.
     79    /// </summary>
     80    /// <exception cref="InvalidOperationException">Thrown when more parents than available should be
     81    /// selected per child.</exception>
     82    /// <param name="source">The scope where to select the individuals.</param>
     83    /// <param name="target">The target scope where to insert the selected individuals.</param>
    6084    protected virtual void Select(IScope source, IScope target) {
    6185      IRandom random = GetVariableValue<IRandom>("Random", source, true);
  • trunk/sources/HeuristicLab.ES/HeuristicLabESPlugin.cs

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

    r99 r896  
    2828
    2929namespace HeuristicLab.ES {
     30  /// <summary>
     31  /// Mutates the endogenous strategy parameters.
     32  /// </summary>
    3033  public class SelfAdaptiveMutationStrengthAdjuster : OperatorBase {
     34    /// <inheritdoc select="summary"/>
    3135    public override string Description {
    3236      get { return @"Mutates the endogenous strategy parameters"; }
    3337    }
    3438
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="SelfAdaptiveMutationStrengthAdjuster"/> with four
     41    /// variable infos (<c>Random</c>, <c>StrategyVector</c>, <c>GeneralLearningRate</c> and
     42    /// <c>LearningRate</c>).
     43    /// </summary>
    3544    public SelfAdaptiveMutationStrengthAdjuster()
    3645      : base() {
     
    4150    }
    4251
     52    /// <summary>
     53    /// Mutates the endogenous strategy parameters.
     54    /// </summary>
     55    /// <remarks>Calls <see cref="OperatorBase.Apply"/> of base class <see cref="OperatorBase"/>.</remarks>
     56    /// <param name="scope">The current scope to mutate.</param>
     57    /// <inheritdoc select="returns"/>
    4358    public override IOperation Apply(IScope scope) {
    4459      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
  • trunk/sources/HeuristicLab.ES/VariableStrengthRepeatingManipulator.cs

    r96 r896  
    2929
    3030namespace HeuristicLab.ES {
     31  /// <summary>
     32  /// Applies its sub operator a number of times depending on the <c>ShakingFactor</c>.
     33  /// </summary>
    3134  public class VariableStrengthRepeatingManipulator : OperatorBase {
     35    /// <inheritdoc select="summary"/>
    3236    public override string Description {
    3337      get { return @"Applies its suboperator a number of times depending on the ShakingFactor"; }
    3438    }
    3539
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="VariableStrengthRepeatingManipulator"/> with two variable
     42    /// infos (<c>Random</c> and <c>ShakingFactor</c>).
     43    /// </summary>
    3644    public VariableStrengthRepeatingManipulator()
    3745      : base() {
     
    4048    }
    4149
     50    /// <summary>
     51    /// Applies its suboperator a number of times depending on the <c>ShakingFactor</c>.
     52    /// </summary>
     53    /// <param name="scope">The current scope where to apply the operator.</param>
     54    /// <returns>A new <see cref="CompositeOperation"/>, containing a specified number of
     55    /// the same operations with the same operator, the number depending on the <c>ShakingFactor</c>.</returns>
    4256    public override IOperation Apply(IScope scope) {
    4357      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
Note: See TracChangeset for help on using the changeset viewer.