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/IntBoundedConstraint.cs

    r764 r1176  
    2828
    2929namespace HeuristicLab.Constraints {
     30  /// <summary>
     31  /// Constraint where an integer value is limited by a one or two sided boundary.
     32  /// </summary>
    3033  public class IntBoundedConstraint : ConstraintBase {
    3134    private int lowerBound;
     35    /// <summary>
     36    /// Gets or sets the lower bound of the limit.
     37    /// </summary>
     38    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     39    /// in the setter.</remarks>
    3240    public int LowerBound {
    3341      get { return lowerBound; }
     
    3846    }
    3947    private bool lowerBoundIncluded;
     48    /// <summary>
     49    /// Gets or sets the boolean flag whether the lower bound should be included.
     50    /// </summary>
     51    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     52    /// in the setter.</remarks>
    4053    public bool LowerBoundIncluded {
    4154      get { return lowerBoundIncluded; }
     
    4659    }
    4760    private bool lowerBoundEnabled;
     61    /// <summary>
     62    /// Gets or sets the boolean flag whether the lower bound should be enabled.
     63    /// </summary>
     64    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     65    /// in the setter.</remarks>
    4866    public bool LowerBoundEnabled {
    4967      get { return lowerBoundEnabled; }
     
    5472    }
    5573    private int upperBound;
     74    /// <summary>
     75    /// Gets or sets the upper bound of the limit.
     76    /// </summary>
     77    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     78    /// in the setter.</remarks>
    5679    public int UpperBound {
    5780      get { return upperBound; }
     
    6285    }
    6386    private bool upperBoundIncluded;
     87    /// <summary>
     88    /// Gets or sets the boolean flag whether the upper bound should be included.
     89    /// </summary>
     90    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     91    /// in the setter.</remarks>
    6492    public bool UpperBoundIncluded {
    6593      get { return upperBoundIncluded; }
     
    7098    }
    7199    private bool upperBoundEnabled;
     100    /// <summary>
     101    /// Gets or sets the boolean flag whether the upper bound should be enabled.
     102    /// </summary>
     103    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/>
     104    /// in the setter.</remarks>
    72105    public bool UpperBoundEnabled {
    73106      get { return upperBoundEnabled; }
     
    78111    }
    79112
     113    /// <inheritdoc select="summary"/>
    80114    public override string Description {
    81115      get { return "The integer is limited one or two sided by a lower and/or upper boundary"; }
    82116    }
    83117
     118    /// <summary>
     119    /// Initializes a new instance of <see cref="IntBoundedConstraint"/>.
     120    /// </summary>
    84121    public IntBoundedConstraint()
    85122      : this(int.MinValue, int.MaxValue) {
    86123    }
    87124
     125    /// <summary>
     126    /// Initializes a new instance of <see cref="IntBoundedConstraint"/> with the two given boundaries.
     127    /// </summary>
     128    /// <param name="low">The lower bound of the constraint.</param>
     129    /// <param name="high">The upper bound of the constraint.</param>
    88130    public IntBoundedConstraint(int low, int high) : base() {
    89131      lowerBound = low;
     
    95137    }
    96138
     139    /// <summary>
     140    /// Checks whether the given element fulfills the current constraint.
     141    /// </summary>
     142    /// <param name="data">The item to check.</param>
     143    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
    97144    public override bool Check(IItem data) {
    98145      ConstrainedIntData d = (data as ConstrainedIntData);
     
    105152    }
    106153
     154    /// <summary>
     155    /// Creates a new instance of <see cref="IntBoundedConstraintView"/> to represent the current
     156    /// instance visually.
     157    /// </summary>
     158    /// <returns>The created view as <see cref="IntBoundedConstraintView"/>.</returns>
    107159    public override IView CreateView() {
    108160      return new IntBoundedConstraintView(this);
    109161    }
    110162
     163    /// <summary>
     164    /// Clones the current instance (deep clone).
     165    /// </summary>
     166    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
     167    /// <returns>The cloned object as <see cref="IntBoundedConstraint"/>.</returns>
    111168    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    112169      IntBoundedConstraint clone = new IntBoundedConstraint();
     
    122179
    123180    #region persistence
     181    /// <summary>
     182    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     183    /// </summary>
     184    /// <remarks>The properties of the current instance are saved as attributes with special tag names.</remarks>
     185    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     186    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     187    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     188    /// (Needed to avoid cycles.)</param>
     189    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    124190    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    125191      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    145211    }
    146212
     213    /// <summary>
     214    /// Loads the persisted constraint from the specified <paramref name="node"/>.
     215    /// </summary>
     216    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for
     217    /// more information.</remarks>
     218    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     219    /// <param name="restoredObjects">The dictionary of all already restored objects.
     220    /// (Needed to avoid cycles.)</param>
    147221    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    148222      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.