Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/27/09 09:31:06 (15 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.BitVector and HeuristicLab.Constraints namespace and changed a comment in HeuristicLab.IntVector namespace(#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Constraints/NumberOfSubOperatorsConstraint.cs

    r764 r1176  
    2929
    3030namespace HeuristicLab.Constraints {
     31  /// <summary>
     32  /// Constraint where the number of sub-operators must be within a specific range.
     33  /// </summary>
    3134  public class NumberOfSubOperatorsConstraint : ConstraintBase {
    3235    private IntData minOperators;
    3336    private IntData maxOperators;
    3437
     38    /// <summary>
     39    /// Gets the maximum number of sub-operators.
     40    /// </summary>
    3541    public IntData MaxOperators {
    3642      get { return maxOperators; }
    3743    }
    3844
     45    /// <summary>
     46    /// Gets the minimum number of sub-operators.
     47    /// </summary>
    3948    public IntData MinOperators {
    4049      get { return minOperators; }
    4150    }
    4251
     52    /// <inheritdoc select="summary"/>
    4353    public override string Description {
    4454      get { return "Number of sub-operators has to be between " + MinOperators.ToString() + " and " + MaxOperators.ToString() + "."; }
    4555    }
    4656
     57    /// <summary>
     58    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraint"/>.
     59    /// </summary>
    4760    public NumberOfSubOperatorsConstraint()
    4861      : this(0,0) {
    4962    }
    5063
     64    /// <summary>
     65    /// Initializes a new instance of <see cref="NumberOfSubOperatorsConstraint"/> with the minimum and
     66    /// the maximum number of sub-operators.
     67    /// </summary>
     68    /// <param name="min">The minimum number of sub-operators.</param>
     69    /// <param name="max">The maximum number of sub-operators.</param>
    5170    public NumberOfSubOperatorsConstraint(int min, int max) : base() {
    5271      minOperators = new IntData(min);
     
    5473    }
    5574
     75    /// <summary>
     76    /// Checks whether the given element fulfills the current constraint.
     77    /// </summary>
     78    /// <param name="data">The item to check.</param>
     79    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
    5680    public override bool Check(IItem data) {
    5781      IOperator op = data as IOperator;
     
    6185    }
    6286
     87    /// <summary>
     88    /// Clones the current instance (deep clone).
     89    /// </summary>
     90    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
     91    /// <returns>The cloned object as <see cref="AndConstraint"/>.</returns>
    6392    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    6493      NumberOfSubOperatorsConstraint clone = new NumberOfSubOperatorsConstraint();
     
    6998    }
    7099
     100    /// <summary>
     101    /// Creates a new instance of <see cref="NumberOfSubOperatorsConstraintView"/> to represent the current
     102    /// instance visually.
     103    /// </summary>
     104    /// <returns>The created view as <see cref="NumberOfSubOperatorsConstraintView"/>.</returns>
    71105    public override IView CreateView() {
    72106      return new NumberOfSubOperatorsConstraintView(this);
     
    74108
    75109    #region persistence
     110    /// <summary>
     111    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     112    /// </summary>
     113    /// <remarks>The minimum and the maximum number of sub-operators are saved as child nodes with tag
     114    /// names <c>min</c> and <c>max</c>.</remarks>
     115    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     116    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     117    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     118    /// (Needed to avoid cycles.)</param>
     119    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    76120    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    77121      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    83127    }
    84128
     129    /// <summary>
     130    /// Loads the persisted constraint from the specified <paramref name="node"/>.
     131    /// </summary>
     132    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for
     133    /// more information.</remarks>
     134    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     135    /// <param name="restoredObjects">The dictionary of all already restored objects.
     136    /// (Needed to avoid cycles.)</param>
    85137    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    86138      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.