Free cookie consent management tool by TermsFeed Policy Generator

Changeset 801 for trunk/sources


Ignore:
Timestamp:
11/21/08 09:48:11 (16 years ago)
Author:
vdorfer
Message:

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

Location:
trunk/sources
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/Interfaces/IScope.cs

    r776 r801  
    9696
    9797    /// <summary>
    98     /// Gets the actual name the given alias.
     98    /// Gets the actual name of the given alias.
    9999    /// </summary>
    100100    /// <param name="name">The alias whose actual name is searched.</param>
  • trunk/sources/HeuristicLab.Core/Variable.cs

    r776 r801  
    6969    }
    7070    /// <summary>
    71     /// Initializes a new instance of <see cref="Variable"/> with the specififed <paramref name="name"/>
     71    /// Initializes a new instance of <see cref="Variable"/> with the specified <paramref name="name"/>
    7272    /// and the specified <paramref name="value"/>.
    7373    /// </summary>
  • trunk/sources/HeuristicLab.Operators/AddVariableInfoDialog.cs

    r51 r801  
    3131
    3232namespace HeuristicLab.Operators {
     33  /// <summary>
     34  /// Dialog to add a variable info.
     35  /// </summary>
    3336  public partial class AddVariableInfoDialog : Form {
    3437    private IVariableInfo myVariableInfo;
     38    /// <summary>
     39    /// Gets the current variable info.
     40    /// </summary>
    3541    public IVariableInfo VariableInfo {
    3642      get { return myVariableInfo; }
    3743    }
    3844
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="AddVariableInfoDialog"/>.
     47    /// </summary>
    3948    public AddVariableInfoDialog() {
    4049      InitializeComponent();
  • trunk/sources/HeuristicLab.Operators/CombinedOperator.cs

    r89 r801  
    2828
    2929namespace HeuristicLab.Operators {
     30  /// <summary>
     31  /// Contains an operator graph and automatically injects its sub-operators into the scope it is
     32  /// applied on (useful for modularization to assemble complex operators out of simpler ones).
     33  /// </summary>
    3034  public class CombinedOperator : DelegatingOperator {
    3135    private string myDescription;
     36    /// <summary>
     37    /// Gets the description of the current instance.
     38    /// </summary>
    3239    public override string Description {
    3340      get { return myDescription; }
    3441    }
    3542    private IOperatorGraph myOperatorGraph;
     43    /// <summary>
     44    /// Gets the operator graph of the current instance.
     45    /// </summary>
    3646    public IOperatorGraph OperatorGraph {
    3747      get { return myOperatorGraph; }
    3848    }
    3949
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="CombinedOperator"/>.
     52    /// </summary>
    4053    public CombinedOperator()
    4154      : base() {
     
    4760    }
    4861
     62    /// <summary>
     63    /// Sets the description of the current instance.
     64    /// </summary>
     65    /// <remarks>Calls <see cref="OnDescriptionChanged"/>.</remarks>
     66    /// <exception cref="NullReferenceException">Thrown when <paramref name="description"/> is <c>null</c>.</exception>
     67    /// <param name="description">The description to set.</param>
    4968    public void SetDescription(string description) {
    5069      if (description == null)
     
    5776    }
    5877
     78    /// <summary>
     79    /// Clones the current instance (deep clone).
     80    /// </summary>
     81    /// <remarks>Calls <see cref="OperatorBase.Clone
     82    /// (System.Collections.Generic.IDictionary&lt;System.Guid, object&gt;)"/>
     83    /// of base class <see cref="DelegatingOperator"/>.<br/>
     84    /// Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     85    /// <see cref="Auxiliary"/>.</remarks>
     86    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     87    /// <returns>The cloned object as <see cref="CombinedOperator"/>.</returns>
    5988    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    6089      CombinedOperator clone = (CombinedOperator)base.Clone(clonedObjects);
     
    6493    }
    6594
     95    /// <summary>
     96    /// Adds all sub operators to the specified <paramref name="scope"/>.
     97    /// </summary>
     98    /// <param name="scope">The scope where to inject the sub operators.</param>
     99    /// <returns><c>null</c> if the initial operator is <c>nulll</c>, else a new
     100    /// <see cref="AtomicOperation"/> with the initial operator and the given <paramref name="scope"/>.</returns>
    66101    public override IOperation Apply(IScope scope) {
    67102      if (OperatorGraph.InitialOperator != null) {
     
    77112    }
    78113
     114    /// <summary>
     115    /// Creates a new instance of <see cref="CombinedOperatorView"/> to display the current instance.
     116    /// </summary>
     117    /// <returns>The created view as <see cref="CombinedOperatorView"/>.</returns>
    79118    public override IView CreateView() {
    80119      return new CombinedOperatorView(this);
    81120    }
    82121
     122    /// <summary>
     123    /// Occurs when the description of the current instance has been changed.
     124    /// </summary>
    83125    public event EventHandler DescriptionChanged;
     126    /// <summary>
     127    /// Fires a new <c>DescriptionChanged</c> event.
     128    /// </summary>
    84129    protected virtual void OnDescriptionChanged() {
    85130      if (DescriptionChanged != null)
     
    88133
    89134    #region Persistence Methods
     135    /// <summary>
     136    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     137    /// </summary>
     138    /// <remarks>The description and the operator graph of the current instance are saved as child
     139    /// nodes with tag names <c>Description</c> <c>OperatorGraph</c>.<br/>
     140    /// Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="DelegatingOperator"/>.</remarks>
     141    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     142    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     143    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     144    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    90145    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    91146      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    96151      return node;
    97152    }
     153    /// <summary>
     154    /// Loads the persisted instance from the specified <paramref name="node"/>.
     155    /// </summary>
     156    /// <remarks>Calls <see cref="OperatorBase.Populate"/> of base class <see cref="DelegatingOperator"/>.
     157    /// <br/> See <see cref="GetXmlNode"/> for further information on how the data must be saved.</remarks>
     158    /// <param name="node">The <see cref="XmlNode"/> where the operator is saved.</param>
     159    /// <param name="restoredObjects">The dictionary of all already restored objects.
     160    /// (Needed to avoid cycles.)</param>
    98161    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    99162      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Operators/CombinedOperatorView.cs

    r52 r801  
    3030
    3131namespace HeuristicLab.Operators {
     32  /// <summary>
     33  /// The visual representation of a <see cref="CombinedOperator"/>.
     34  /// </summary>
    3235  public partial class CombinedOperatorView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the combined operator to display.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3341    public CombinedOperator CombinedOperator {
    3442      get { return (CombinedOperator)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Removes the eventhandlers in all children and from the underlying <see cref="CombinedOperator"/>.
     48    /// </summary>
     49    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    3850    protected override void RemoveItemEvents() {
    3951      operatorGraphView.OperatorGraph = null;
     
    4456      base.RemoveItemEvents();
    4557    }
    46 
     58   
     59    /// <summary>
     60    /// Adds event handlers in all children and to the underlying <see cref="CombinedOperator"/>.
     61    /// </summary>
     62    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4763    protected override void AddItemEvents() {
    4864      base.AddItemEvents();
     
    5470    }
    5571
     72    /// <summary>
     73    /// Initializes a new instance of <see cref="CombinedOperatorView"/>.
     74    /// </summary>
    5675    public CombinedOperatorView() {
    5776      InitializeComponent();
    5877    }
     78    /// <summary>
     79    /// Initializes a new instance of <see cref="CombinedOperatorView"/> with the specified
     80    /// <paramref name="combinedOperator"/>.
     81    /// </summary>
     82    /// <param name="combinedOperator">The combined operator to display.</param>
    5983    public CombinedOperatorView(CombinedOperator combinedOperator)
    6084      : this() {
     
    6286    }
    6387
     88    /// <summary>
     89    /// Updates all controls with the latest data of the model.
     90    /// </summary>
    6491    protected override void UpdateControls() {
    6592      base.UpdateControls();
  • trunk/sources/HeuristicLab.Operators/ComparatorBase.cs

    r77 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Base class for operators which perform comparisons between two items.
     31  /// </summary>
    2932  public abstract class ComparatorBase : OperatorBase {
     33    /// <summary>
     34    /// Initializes a new instance of <see cref="ComparatorBase"/> with three
     35    /// variable infos (<c>LeftSide</c>, <c>RightSide</c> and <c>Result</c>).
     36    /// </summary>
    3037    protected ComparatorBase() {
    3138      AddVariableInfo(new VariableInfo("LeftSide", "Variable on the left side of the comparison", typeof(IItem), VariableKind.In));
     
    3441    }
    3542
     43    /// <summary>
     44    /// Compares two items with each other and injects the <c>Result</c> variable - if it is no local one - into
     45    /// the specified <paramref name="scope"/>.
     46    /// </summary>
     47    /// <remarks>Calls <see cref="Compare"/>.</remarks>
     48    /// <exception cref="InvalidOperationException">Thrown when left side of the comparison does not
     49    /// implement <see cref="IComparable"/>.</exception>
     50    /// <param name="scope">The scope where to apply the compare operation.</param>
     51    /// <returns><c>null</c>.</returns>
    3652    public override IOperation Apply(IScope scope) {
    3753      BoolData result = GetVariableValue<BoolData>("Result", scope, false, false);
     
    5268    }
    5369
     70    /// <summary>
     71    /// Compares two variables with each other.
     72    /// </summary>
     73    /// <param name="left">The variable on the left side of the comparison.</param>
     74    /// <param name="right">The variable on the right side of the comparison.</param>
     75    /// <returns><c>true</c> if the comparison query was successful, <c>false</c> otherwise.</returns>
    5476    protected abstract bool Compare(IComparable left, IItem right);
    5577  }
  • trunk/sources/HeuristicLab.Operators/ConditionalBranch.cs

    r49 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Branch of (one or)two operators whose executions depend on a specific condition.
     31  /// </summary>
    2932  public class ConditionalBranch : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"ConditionalBranch expects to have 1 or 2 sub-operators.
     
    3539    }
    3640
     41    /// <summary>
     42    /// Initializes a new instance of <see cref="ConditionalBranch"/> with one variable info
     43    /// (<c>Condition</c>).
     44    /// </summary>
    3745    public ConditionalBranch()
    3846      : base() {
     
    4048    }
    4149
     50    /// <summary>
     51    /// Applies the operator of branch one under a specific condition on the given
     52    /// <paramref name="scope"/>, or - if existent - operator of branch two if the condition could not
     53    /// be fulfilled.
     54    /// </summary>
     55    /// <param name="scope">The scope to apply the operators on.</param>
     56    /// <returns>A new <see cref="AtomicOperation"/> with either operator 1 or operator 2 applied
     57    /// to the given <paramref name="scope"/> or <c>null</c>.</returns>
    4258    public override IOperation Apply(IScope scope) {
    4359      BoolData resultData = GetVariableValue<BoolData>("Condition", scope, true);
  • trunk/sources/HeuristicLab.Operators/Counter.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Class to increment an int variable by 1.
     31  /// </summary>
    2932  public class Counter : OperatorBase {
     33    /// <summary>
     34    /// Gets the description of the current instance.
     35    /// </summary>
    3036    public override string Description {
    3137      get { return @"TODO\r\nOperator description still missing ..."; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="Counter"/> with one variable info (<c>Value</c>).
     42    /// </summary>
    3443    public Counter()
    3544      : base() {
     
    3746    }
    3847
     48    /// <summary>
     49    /// Increments an int value of the specified <paramref name="scope"/> by one.
     50    /// </summary>
     51    /// <param name="scope">The scope whose variable should be incremented.</param>
     52    /// <returns><c>null</c>.</returns>
    3953    public override IOperation Apply(IScope scope) {
    4054      IntData value = GetVariableValue<IntData>("Value", scope, true);
  • trunk/sources/HeuristicLab.Operators/DataCollector.cs

    r723 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Collects values of specific variable names in a given scope.
     31  /// </summary>
    2932  public class DataCollector : 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="DataCollector"/> with two variable infos
     40    /// (<c>VariableNames</c> and <c>Values</c>).
     41    /// </summary>
    3442    public DataCollector() {
    3543      IVariableInfo variableNamesVariableInfo = new VariableInfo("VariableNames", "Names of variables whose values should be collected", typeof(ItemList<StringData>), VariableKind.In);
     
    4149    }
    4250
     51    /// <summary>
     52    /// Collects the values of a specified list of variable names in the given <paramref name="scope"/>.
     53    /// </summary>
     54    /// <param name="scope">The scope where to collect the values from.</param>
     55    /// <returns><c>null</c>.</returns>
    4356    public override IOperation Apply(IScope scope) {
    4457      ItemList<StringData> names = GetVariableValue<ItemList<StringData>>("VariableNames", scope, false);
  • trunk/sources/HeuristicLab.Operators/DelegatingOperator.cs

    r113 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Base class for operators that call other operators.
     31  /// </summary>
    2932  public abstract class DelegatingOperator : OperatorBase {
     33    /// <summary>
     34    /// Executes the specified operator in the given <paramref name="scope"/>.
     35    /// </summary>
     36    /// <remarks>Calls <see cref="OperatorBase.OnExecuted"/>.<br/>
     37    /// Will be executed two times: First to execute the operation where the local variables
     38    /// are added to the global scope and a second time to remove the local variables again.</remarks>
     39    /// <param name="scope">The scope where to apply the operation.</param>
     40    /// <returns><c>null</c>.</returns>
    3041    public override IOperation Execute(IScope scope) {
    3142      myCanceled = false;
  • trunk/sources/HeuristicLab.Operators/DoubleCounter.cs

    r311 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Class to add a specified interval to a double value.
     31  /// </summary>
    2932  public class DoubleCounter : OperatorBase {
     33    /// <summary>
     34    /// Gets the description of the current instance.
     35    /// </summary>
    3036    public override string Description {
    3137      get { return @"Adds a given interval to a double value"; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="DoubleCounter"/>, including two variable infos
     42    /// (<c>Value</c> and <c>Interval</c>).
     43    /// </summary>
    3444    public DoubleCounter()
    3545      : base() {
     
    3848    }
    3949
     50    /// <summary>
     51    /// Adds to a double value of the given <paramref name="scope"/> a specified interval.
     52    /// </summary>
     53    /// <param name="scope">The scope whose variable should be incremented.</param>
     54    /// <returns><c>null</c>.</returns>
    4055    public override IOperation Apply(IScope scope) {
    4156      DoubleData value = GetVariableValue<DoubleData>("Value", scope, true);
  • trunk/sources/HeuristicLab.Operators/EmptyOperator.cs

    r2 r801  
    2626
    2727namespace HeuristicLab.Operators {
     28  /// <summary>
     29  /// Placeholder and also used for testing; Does nothing.
     30  /// </summary>
    2831  public class EmptyOperator : OperatorBase {
     32    /// <inheritdoc select="summary"/>
    2933    public override string Description {
    3034      get { return "An empty operator just does nothing. Useful for testing and as a place holder for sub-operators of SequentialSubScopesProcessor and ParallelSubScopesProcessor."; }
    3135    }
    3236
     37    /// <summary>
     38    /// Initializes a new instance of <see cref="EmptyOperator"/>.
     39    /// </summary>
    3340    public EmptyOperator()
    3441      : base() {
    3542    }
    3643
     44    /// <summary>
     45    /// Does nothing.
     46    /// </summary>
     47    /// <param name="scope">The scope to apply the operator on.</param>
     48    /// <returns><c>null</c>.</returns>
    3749    public override IOperation Apply(IScope scope) {
    3850      return null;
  • trunk/sources/HeuristicLab.Operators/EqualToComparator.cs

    r2 r801  
    2828
    2929namespace HeuristicLab.Operators {
     30  /// <summary>
     31  /// Operator to check whether two items are equal to each other.
     32  /// </summary>
    3033  public class EqualToComparator : ComparatorBase {
     34
     35    /// <inheritdoc select="summary"/>
    3136    public override string Description {
    3237      get { return @"TODO\r\nOperator description still missing ..."; }
    3338    }
    3439
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="EqualToComparator"/>.
     42    /// </summary>
    3543    public EqualToComparator()
    3644      : base() {
    3745    }
    3846
     47    /// <summary>
     48    /// Checks whether the two specified items are equal to each other.
     49    /// </summary>
     50    /// <param name="left">The left side of the comparison.</param>
     51    /// <param name="right">The right side of the comparison.</param>
     52    /// <returns><c>true</c> if the two elements are equal to each other, <c>false otherwise</c>.</returns>
    3953    protected override bool Compare(IComparable left, IItem right) {
    4054      return left.CompareTo(right) == 0;
  • trunk/sources/HeuristicLab.Operators/GreaterOrEqualThanComparator.cs

    r2 r801  
    2828
    2929namespace HeuristicLab.Operators {
     30  /// <summary>
     31  /// Operator to check whether one item is equal or greater than another.
     32  /// </summary>
    3033  public class GreaterOrEqualThanComparator : ComparatorBase {
     34    /// <inheritdoc select="summary"/>
    3135    public override string Description {
    3236      get { return @"TODO\r\nOperator description still missing ..."; }
    3337    }
    34 
     38    /// <summary>
     39    /// Initializes a new instance of <see cref="GreaterOrEqualThanComparator"/>.
     40    /// </summary>
    3541    public GreaterOrEqualThanComparator()
    3642      : base() {
    3743    }
    3844
     45    /// <summary>
     46    /// Checks whether the <paramref name="left"/> item is greater or equal to the <paramref name="right"/>.
     47    /// </summary>
     48    /// <param name="left">The left side of the comparison.</param>
     49    /// <param name="right">The right side of the comparison.</param>
     50    /// <returns><c>true</c> if the <paramref name="left"/> item is greater or equal to the
     51    /// <paramref name="right"/>, <c>false</c> otherwise.</returns>
    3952    protected override bool Compare(IComparable left, IItem right) {
    4053      return left.CompareTo(right) >= 0;
  • trunk/sources/HeuristicLab.Operators/GreaterThanComparator.cs

    r2 r801  
    2828
    2929namespace HeuristicLab.Operators {
     30  /// <summary>
     31  /// Operator to check whether an item is greater than another one.
     32  /// </summary>
    3033  public class GreaterThanComparator : ComparatorBase {
     34    /// <inheritdoc select="summary"/>
    3135    public override string Description {
    3236      get { return @"TODO\r\nOperator description still missing ..."; }
    3337    }
    3438
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="GreaterThanComparator"/>.
     41    /// </summary>
    3542    public GreaterThanComparator()
    3643      : base() {
    3744    }
    3845
     46    /// <summary>
     47    /// Checks whether the <paramref name="left"/> item is greater than the <paramref name="right"/>.
     48    /// </summary>
     49    /// <param name="left">The left side of the comparison.</param>
     50    /// <param name="right">The right side of the comparison.</param>
     51    /// <returns><c>true</c> if the <paramref name="left"/> item is greater than the
     52    /// <paramref name="right"/>, <c>false</c> otherwise.</returns>
    3953    protected override bool Compare(IComparable left, IItem right) {
    4054      return left.CompareTo(right) > 0;
  • trunk/sources/HeuristicLab.Operators/HeuristicLabOperatorsPlugin.cs

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

    r2 r801  
    2828
    2929namespace HeuristicLab.Operators {
     30  /// <summary>
     31  /// Operator to check whether an item is less or equal to another one.
     32  /// </summary>
    3033  public class LessOrEqualThanComparator : ComparatorBase {
     34    /// <inheritdoc select="summary"/>
    3135    public override string Description {
    3236      get { return @"TODO\r\nOperator description still missing ..."; }
    3337    }
    3438
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="LessOrEqualThanComparator"/>.
     41    /// </summary>
    3542    public LessOrEqualThanComparator()
    3643      : base() {
    3744    }
    3845
     46    /// <summary>
     47    /// Checks whether the <paramref name="left"/> item is less or equal to the <paramref name="right"/>.
     48    /// </summary>
     49    /// <param name="left">The left side of the comparison.</param>
     50    /// <param name="right">The right side of the comparison.</param>
     51    /// <returns><c>true</c> if the <paramref name="left"/> item is less or equal to the
     52    /// <paramref name="right"/>, <c>false</c> otherwise.</returns>
    3953    protected override bool Compare(IComparable left, IItem right) {
    4054      return left.CompareTo(right) <= 0;
  • trunk/sources/HeuristicLab.Operators/LessThanComparator.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Operator to check whether an item is less than another one.
     31  /// </summary>
    2932  public class LessThanComparator : ComparatorBase {
     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="LessThanComparator"/>.
     40    /// </summary>
    3441    public LessThanComparator()
    3542      : base() {
    3643    }
    3744
     45    /// <summary>
     46    /// Checks whether the <paramref name="left"/> item is less than the <paramref name="right"/>.
     47    /// </summary>
     48    /// <param name="left">The left side of the comparison.</param>
     49    /// <param name="right">The right side of the comparison.</param>
     50    /// <returns><c>true</c> if the <paramref name="left"/> item is less than the
     51    /// <paramref name="right"/>, <c>false</c> otherwise.</returns>
    3852    protected override bool Compare(IComparable left, IItem right) {
    3953      return left.CompareTo(right) < 0;
  • trunk/sources/HeuristicLab.Operators/OperatorExtractor.cs

    r50 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Retrieves an operator from a specified scope and returns a successor operation with this operation
     31  /// and scope.
     32  /// </summary>
    2933  public class OperatorExtractor : OperatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return @"An operator extractor retrievs an operator from the scope it is applied on and returns a successor operation containing this operator and the current scope. Lookup for the operator is done recursively.
     
    3439    }
    3540
     41    /// <summary>
     42    /// Initializes a new instance of <see cref="OperatorExtractor"/> with
     43    /// one variable info (<c>Operator</c>).
     44    /// </summary>
    3645    public OperatorExtractor()
    3746      : base() {
     
    3948    }
    4049
     50    /// <summary>
     51    /// Gets an operator from the specified <paramref name="scope"/> and returns an
     52    /// <see cref="AtomicOperation"/> containing this operator and scope.
     53    /// </summary>
     54    /// <param name="scope">The scope where to apply the operator on.</param>
     55    /// <returns>A new <see cref="AtomicOperation"/> containing the operator and the given
     56    /// <paramref name="scope"/>.</returns>
    4157    public override IOperation Apply(IScope scope) {
    4258      IOperator op = GetVariableValue<IOperator>("Operator", scope, true, true);
  • trunk/sources/HeuristicLab.Operators/ParallelProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs <c>n</c> operators on the given scope; operations can be executed in parallel.
     31  /// </summary>
    2932  public class ParallelProcessor : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Applies <c>n</c> operators on the given <paramref name="scope"/>.
     40    /// </summary>
     41    /// <param name="scope">The scope to apply the operators on.</param>
     42    /// <returns>A new <see cref="CompositeOperation"/> with the <c>n</c> operators applied
     43    /// to the given <paramref name="scope"/> with the <c>ExecuteInParallel</c> set to <c>true</c>.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/ParallelSubScopesProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs <c>n</c> operators on <c>n</c> subscopes, operations can be executed in parallel.
     31  /// </summary>
    2932  public class ParallelSubScopesProcessor : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Applies <c>n</c> operators on all the <c>n</c> sub scopes of the given <paramref name="scope"/>.
     40    /// </summary>
     41    /// <param name="scope">The scope on whose sub scopes the operators are applied.</param>
     42    /// <returns>A new <see cref="CompositeOperation"/> with the <c>i</c>th operator applied
     43    /// on the <c>i</c>th sub scope, the <c>ExecuteInParallel</c> flag set to <c>true</c>.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/ScopeCleaner.cs

    r101 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Operator that removes all variables in the given scope and deletes also all subscopes.
     31  /// </summary>
    2932  public class ScopeCleaner : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"Removes all variables in the current scope and deletes all subscopes"; }
    3236    }
    3337
     38    /// <summary>
     39    /// Deletes all variable and sub scopes from the given <paramref name="scope"/>.
     40    /// </summary>
     41    /// <remarks>Calls <see cref="IScope.Clear"/> of interface <see cref="IScope"/>.</remarks>
     42    /// <param name="scope">The scope to clear.</param>
     43    /// <returns><c>null</c>.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      scope.Clear();
  • trunk/sources/HeuristicLab.Operators/SequentialProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs <c>n</c> operators on the given scope sequentially.
     31  /// </summary>
    2932  public class SequentialProcessor : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Applies <c>n</c> operators on the given <paramref name="scope"/>.
     40    /// </summary>
     41    /// <param name="scope">The scope to apply the operators on.</param>
     42    /// <returns>A new <see cref="CompositeOperation"/> with the <c>n</c> operators applied
     43    /// to the given <paramref name="scope"/>.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/SequentialSubScopesProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs <c>n</c> operators on <c>n</c> subscopes, operations must be executed sequentially.
     31  /// </summary>
    2932  public class SequentialSubScopesProcessor : OperatorBase {
     33    /// <inheritdoc select="summary"/>
    3034    public override string Description {
    3135      get { return @"TODO\r\nOperator description still missing ..."; }
    3236    }
    3337
     38    /// <summary>
     39    /// Applies <c>n</c> operators on all the <c>n</c> sub scopes of the given <paramref name="scope"/>.
     40    /// </summary>
     41    /// <param name="scope">The scope on whose sub scopes the operators are applied.</param>
     42    /// <returns>A new <see cref="CompositeOperation"/> with the <c>i</c>th operator applied
     43    /// on the <c>i</c>th sub scope.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/SingleObjectiveEvaluatorBase.cs

    r77 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Calculates the quality of a solution candidate.
     31  /// </summary>
    2932  public abstract class SingleObjectiveEvaluatorBase : OperatorBase {
     33    /// <summary>
     34    /// Initializes a new instance of <see cref="SingleObjectiveEvaluatorBase"/> with one variable info
     35    /// (<c>Quality</c>).
     36    /// </summary>
    3037    public SingleObjectiveEvaluatorBase()
    3138      : base() {
     
    3340    }
    3441
     42    /// <summary>
     43    /// Evaluates the quality of a solution candidate.
     44    /// </summary>
     45    /// <remarks>Creates a new variable with the calculated quality if it not already exists, and
     46    /// injects it in the given <paramref name="scope"/> if it is not a local one.</remarks>
     47    /// <param name="scope">The scope where to evaluate the quality.</param>
     48    /// <returns><c>null</c>.</returns>
    3549    public override IOperation Apply(IScope scope) {
    3650      double qualityValue = Evaluate(scope);
     
    4963    }
    5064
     65    /// <summary>
     66    /// Calculates the quality of a solution candidate in the given <paramref name="scope"/>.
     67    /// </summary>
     68    /// <param name="scope">The scope where to calculate the quality.</param>
     69    /// <returns>A double value that indicates the quality.</returns>
    5170    protected abstract double Evaluate(IScope scope);
    5271  }
  • trunk/sources/HeuristicLab.Operators/Sorter.cs

    r77 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Sorts all sub scopes of a given scope.
     31  /// </summary>
    2932  public class Sorter : 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="Sorter"/> with two variable infos
     40    /// (<c>Descending</c> and <c>Value</c>).
     41    /// </summary>
    3442    public Sorter()
    3543      : base() {
     
    3846    }
    3947
     48    /// <summary>
     49    /// Sorts all sub scopes of the given <paramref name="scope"/>.
     50    /// </summary>
     51    /// <remarks>Calls <see cref="IScope.ReorderSubScopes"/>.</remarks>
     52    /// <param name="scope">The scope where to apply the sorting.</param>
     53    /// <returns><c>null</c>.</returns>
    4054    public override IOperation Apply(IScope scope) {
    4155      bool descending = GetVariableValue<BoolData>("Descending", scope, true).Data;
  • trunk/sources/HeuristicLab.Operators/StochasticBranch.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Branch of (one or) two operators that have different probabilities to get executed.
     31  /// </summary>
    2932  public class StochasticBranch : 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="StochasticBranch"/> with two variable infos
     40    /// (<c>Random</c> and <c>Probability</c>).
     41    /// </summary>
    3442    public StochasticBranch()
    3543      : base() {
     
    3846    }
    3947
     48    /// <summary>
     49    /// Applies the operator of branch one with a specific probability on the given
     50    /// <paramref name="scope"/>, or - if existent - with another probability operator of branch two. 
     51    /// </summary>
     52    /// <param name="scope">The scope to apply the operators on.</param>
     53    /// <returns>A new <see cref="AtomicOperation"/> with either operator 1 or operator 2 applied
     54    /// to the given <paramref name="scope"/> or <c>null</c>.</returns>
    4055    public override IOperation Apply(IScope scope) {
    4156      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
  • trunk/sources/HeuristicLab.Operators/StochasticMultiBranch.cs

    r46 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Branch of operators that have different probabilities to get executed.
     31  /// </summary>
    2932  public class StochasticMultiBranch : 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="StochasticMultiBranch"/> with two variable infos
     40    /// (<c>Probabilities</c> and <c>Random</c>).
     41    /// </summary>
    3442    public StochasticMultiBranch()
    3543      : base() {
     
    3846    }
    3947
     48    /// <summary>
     49    /// Applies an operator of the branches to the specified <paramref name="scope"/> with a
     50    /// specific probability.
     51    /// </summary>
     52    /// <exception cref="InvalidOperationException">Thrown when the list of probabilites does not
     53    /// match the number of operators or if there was another problem with the list of probabilities.</exception>
     54    /// <param name="scope">The scope to apply the operators on.</param>
     55    /// <returns>A new <see cref="AtomicOperation"/> with a specific operator, depending
     56    /// on its probability, applied on the given <paramref name="scope"/>.</returns>
    4057    public override IOperation Apply(IScope scope) {
    4158      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
  • trunk/sources/HeuristicLab.Operators/SubScopesCreater.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Operator to create sub scopes in a given scope.
     31  /// </summary>
    2932  public class SubScopesCreater : 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="SubScopesCreater"/> with one variable info (<c>SubScopes</c>).
     40    /// </summary>
    3441    public SubScopesCreater()
    3542      : base() {
     
    3744    }
    3845
     46    /// <summary>
     47    /// Creates a specified number of sub scopes in the given <paramref name="scope"/>.
     48    /// </summary>
     49    /// <param name="scope">The scope where to create the sub scopes.</param>
     50    /// <returns><c>null</c>.</returns>
    3951    public override IOperation Apply(IScope scope) {
    4052      IntData count = GetVariableValue<IntData>("SubScopes", scope, true);
  • trunk/sources/HeuristicLab.Operators/SubScopesMixer.cs

    r788 r801  
    5959    /// </example>
    6060    /// </remarks>
     61    /// <exception cref="ArgumentException">Thrown when the number of sub scopes cannot be divided by
     62    /// the number of partitions without remainder.</exception>
    6163    /// <param name="scope">The scope whose sub scopes should be mixed.</param>
    6264    /// <returns><c>null</c>.</returns>
  • trunk/sources/HeuristicLab.Operators/SubScopesRemover.cs

    r591 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Removes one specified or - if nothing specified - all operators from the given scope.
     31  /// </summary>
    2932  public class SubScopesRemover : OperatorBase {
     33    /// <inheritdoc/>
    3034    public override string Description {
    3135      get {
     
    3438    }
    3539
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="SubScopesRemover"/> with one variable info
     42    /// (<c>SubScopeIndex</c>).
     43    /// </summary>
    3644    public SubScopesRemover()
    3745      : base() {
     
    3947    }
    4048
     49    /// <summary>
     50    /// Removes one sub scope with a specified index from the given <paramref name="scope"/>, or if no
     51    /// index has been specified, all sub scopes are removed.
     52    /// </summary>
     53    /// <exception cref="InvalidOperationException">Thrown when no sub scope with the specified index
     54    /// exists.</exception>
     55    /// <param name="scope">The scope whose sub scope(s) to remove.</param>
     56    /// <returns><c>null</c>.</returns>
    4157    public override IOperation Apply(IScope scope) {
    4258      IntData index = GetVariableValue<IntData>("SubScopeIndex", scope, true, false);
  • trunk/sources/HeuristicLab.Operators/UnequalToComparator.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Operator to check whether two items are not equal to each other.
     31  /// </summary>
    2932  public class UnequalToComparator : ComparatorBase {
     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="UnequalToComparator"/>.
     40    /// </summary>
    3441    public UnequalToComparator()
    3542      : base() {
    3643    }
    3744
     45    /// <summary>
     46    /// Checks whether the <paramref name="left"/> item is not equal to the <paramref name="right"/>.
     47    /// </summary>
     48    /// <param name="left">The left side of the comparison.</param>
     49    /// <param name="right">The right side of the comparison.</param>
     50    /// <returns><c>true</c> if the <paramref name="left"/> item is not equal
     51    /// to the <paramref name="right"/>, <c>false</c> otherwise.</returns>
    3852    protected override bool Compare(IComparable left, IItem right) {
    3953      return left.CompareTo(right) != 0;
  • trunk/sources/HeuristicLab.Operators/UniformParallelSubScopesProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs the same operator on all <c>n</c> existing sub scopes of a given scope;
     31  /// operations can be executed in parallel.
     32  /// </summary>
    2933  public class UniformParallelSubScopesProcessor : OperatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return @"TODO\r\nOperator description still missing ..."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Applies one operator on all the sub scopes of the given <paramref name="scope"/>.
     41    /// </summary>
     42    /// <param name="scope">The scope on whose sub scopes the operator is applied.</param>
     43    /// <returns>A new <see cref="CompositeOperation"/> with one operator and all sub scopes and
     44    /// the <c>ExecuteInParallel</c> flag set to <c>true</c>.</returns>
    3445    public override IOperation Apply(IScope scope) {
    3546      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/UniformSequentialSubScopesProcessor.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Performs the same operator on all existing sub scopes of a given scope,
     31  /// must be executed sequentially.
     32  /// </summary>
    2933  public class UniformSequentialSubScopesProcessor : OperatorBase {
     34    /// <inheritdoc select="summary"/>
    3035    public override string Description {
    3136      get { return @"TODO\r\nOperator description still missing ..."; }
    3237    }
    3338
     39    /// <summary>
     40    /// Applies one operator on all the sub scopes of the given <paramref name="scope"/>.
     41    /// </summary>
     42    /// <param name="scope">The scope on whose sub scopes the operator is applied.</param>
     43    /// <returns>A new <see cref="CompositeOperation"/> with one operator and all sub scopes.</returns>
    3444    public override IOperation Apply(IScope scope) {
    3545      CompositeOperation next = new CompositeOperation();
  • trunk/sources/HeuristicLab.Operators/VariableInjector.cs

    r2 r801  
    2727
    2828namespace HeuristicLab.Operators {
     29  /// <summary>
     30  /// Class to inject local variables into the scope.
     31  /// </summary>
    2932  public class VariableInjector : OperatorBase {
    3033    private Dictionary<IVariable, IVariableInfo> variableVariableInfoTable;
    3134    private Dictionary<IVariableInfo, IVariable> variableInfoVariableTable;
    3235
     36    /// <inheritdoc select="summary"/>
    3337    public override string Description {
    3438      get { return @"TODO\r\nOperator description still missing ..."; }
    3539    }
    3640
     41    /// <summary>
     42    /// Initializes a new instance of <see cref="VariableInjector"/>.
     43    /// </summary>
    3744    public VariableInjector()
    3845      : base() {
     
    4148    }
    4249
     50    /// <summary>
     51    /// Clones the current instance (deep clone).
     52    /// </summary>
     53    /// <remarks>Deep clone performed with <see cref="Auxiliary.Clone"/> of helper class
     54    /// <see cref="Auxiliary"/>.</remarks>
     55    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     56    /// <returns>The cloned object as <see cref="VariableInjector"/>.</returns>
    4357    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4458      VariableInjector clone = new VariableInjector();
     
    5064    }
    5165
     66    /// <summary>
     67    /// Adds the specified <paramref name="variable"/> to the current instance to get injected.
     68    /// </summary>
     69    /// <param name="variable">The variable to add.</param>
     70    /// <remarks>Calls private method <see cref="CreateVariableInfo"/> and <see cref="OperatorBase.AddVariable"/>
     71    /// of base class <see cref="OperatorBase"/>.</remarks>
    5272    public override void AddVariable(IVariable variable) {
    5373      base.AddVariable(variable);
     
    5575    }
    5676
     77    /// <summary>
     78    /// Removes a variable with the specified <paramref name="name"/> from the current injector.
     79    /// </summary>
     80    /// <remarks>Calls private method <see cref="DeleteVariableInfo"/> and <see cref="OperatorBase.RemoveVariable"/>
     81    /// of base class <see cref="OperatorBase"/>.</remarks>
     82    /// <param name="name">The name of the </param>
    5783    public override void RemoveVariable(string name) {
    5884      DeleteVariableInfo(name);
     
    6086    }
    6187
     88    /// <summary>
     89    /// Adds the specified variables to the given <paramref name="scope"/> (and removes them first,
     90    /// if they already exist in the current scope).
     91    /// </summary>
     92    /// <param name="scope">The scope where to inject the variables.</param>
     93    /// <returns><c>null</c>.</returns>
    6294    public override IOperation Apply(IScope scope) {
    6395      foreach (IVariable variable in Variables) {
     
    69101    }
    70102
     103    /// <summary>
     104    /// Creates a new instance of <see cref="VariableInjectorView"/> to display the current instance.
     105    /// </summary>
     106    /// <returns>The created view as <see cref="VariableInjectorView"/>.</returns>
    71107    public override IView CreateView() {
    72108      return new VariableInjectorView(this);
     
    108144
    109145    #region Persistence Methods
     146    /// <summary>
     147    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     148    /// <note type="caution"> Variable infos are not persisted!</note>
     149    /// </summary>
     150    /// <remarks>Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="OperatorBase"/>.</remarks>
     151    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     152    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     153    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     154    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    110155    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    111156      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
  • trunk/sources/HeuristicLab.Operators/VariableInjectorView.cs

    r2 r801  
    3030
    3131namespace HeuristicLab.Operators {
     32  /// <summary>
     33  /// Visual representation of <see cref="VariableInjector"/>.
     34  /// </summary>
    3235  public partial class VariableInjectorView : OperatorBaseView {
     36    /// <summary>
     37    /// Gets or sets the <see cref="HeuristicLab.Operators.VariableInjector"/> to display.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="OperatorBaseView.Operator"/> of base class
     40    /// <see cref="OperatorBaseView"/>. No own data storage present.</remarks>
    3341    public VariableInjector VariableInjector {
    34       get { return (VariableInjector)Item; }
     42      get { return (VariableInjector)Operator; }
    3543      set { base.Operator = value; }
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of <see cref="VariableInjectorView"/>.
     48    /// </summary>
    3849    public VariableInjectorView() {
    3950      InitializeComponent();
    4051      tabControl.SelectedTab = variablesTabPage;
    4152    }
     53    /// <summary>
     54    /// Initializes a new instance of <see cref="VariableInjectorView"/> with the specified
     55    /// <paramref name="variableInjector"/>.
     56    /// </summary>
     57    /// <param name="variableInjector">The variable injector to display.</param>
    4258    public VariableInjectorView(VariableInjector variableInjector)
    4359      : this() {
Note: See TracChangeset for help on using the changeset viewer.