Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/02/08 12:41:21 (16 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.Routing.TSP namespace (#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Routing.TSP/TSPTour.cs

    r2 r884  
    2929
    3030namespace HeuristicLab.Routing.TSP {
     31  /// <summary>
     32  /// Represent the tour of a TSP.
     33  /// </summary>
    3134  public class TSPTour : ItemBase, IVisualizationItem {
    3235    private DoubleMatrixData myCoordinates;
     36    /// <summary>
     37    /// Gets or sets the coordinates of the current instance.
     38    /// </summary>
    3339    public DoubleMatrixData Coordinates {
    3440      get { return myCoordinates; }
     
    3642    }
    3743    private Permutation.Permutation myTour;
     44    /// <summary>
     45    /// Gets or sets the current permutation/tour of the current instance.
     46    /// </summary>
    3847    public Permutation.Permutation Tour {
    3948      get { return myTour; }
     
    4251
    4352
     53    /// <summary>
     54    /// Initializes a new instance of <see cref="TSPTour"/>.
     55    /// </summary>
    4456    public TSPTour() { }
     57    /// <summary>
     58    /// Initializes a new instance of <see cref="TSPTour"/> with the given <paramref name="coordinates"/>
     59    /// and the given <paramref name="tour"/>.
     60    /// </summary>
     61    /// <param name="coordinates">The coordinates of the TSP.</param>
     62    /// <param name="tour">The tour the current instance should represent.</param>
    4563    public TSPTour(DoubleMatrixData coordinates, Permutation.Permutation tour) {
    4664      myCoordinates = coordinates;
     
    4866    }
    4967
    50 
     68    /// <summary>
     69    /// Clones the current instance (deep clone).
     70    /// </summary>
     71    /// <remarks>Uses <see cref="Auxiliary.Clone"/> method of class <see cref="Auxiliary"/> to clone
     72    /// the coordinates.</remarks>
     73    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     74    /// <returns>The cloned object as <see cref="TSPTour"/>.</returns>
    5175    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5276      TSPTour clone = (TSPTour)base.Clone(clonedObjects);
     
    5680    }
    5781
     82    /// <summary>
     83    /// Creates a new instance of <see cref="TSPTourView"/> to display the current instance.
     84    /// </summary>
     85    /// <returns>The created view as <see cref="TSPTourView"/>.</returns>
    5886    public override IView CreateView() {
    5987      return new TSPTourView(this);
    6088    }
    6189
     90    /// <summary>
     91    /// Occurs when the coordinates of the current instance have been changed.
     92    /// </summary>
    6293    public event EventHandler CoordinatesChanged;
     94    /// <summary>
     95    /// Fires a new <c>CoordinatesChanged</c> event.
     96    /// </summary>
    6397    protected virtual void OnCoordinatesChanged() {
    6498      if (CoordinatesChanged != null)
    6599        CoordinatesChanged(this, new EventArgs());
    66100    }
     101    /// <summary>
     102    /// Occurs when the tour of the current instance has been changed.
     103    /// </summary>
    67104    public event EventHandler TourChanged;
     105    /// <summary>
     106    /// Fires a new <c>TourChanged</c> event.
     107    /// </summary>
    68108    protected virtual void OnTourChanged() {
    69109      if (TourChanged != null)
     
    72112
    73113    #region Persistence Methods
     114    /// <summary>
     115    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     116    /// </summary>
     117    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. <br/>
     118    /// The coordinates and the tour are saved as a child node with the tag names <c>Coordinates</c> and
     119    /// <c>Tour</c>.</remarks>
     120    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     121    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     122    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     123    /// (Needed to avoid cycles.)</param>
     124    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    74125    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    75126      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    78129      return node;
    79130    }
     131    /// <summary>
     132    /// Loads the persisted TSP tour from the specified <paramref name="node"/>.
     133    /// </summary>
     134    /// <remarks>Calls <see cref="StorableBase.Populate"/> of base class
     135    /// <see cref="ItemBase"/>.<br/>
     136    /// The coordinates and the tour must be saved as child nodes with the tag names <c>Coordinates</c>
     137    /// and <c>Tour</c> (see <see cref="GetXmlNode"/>).</remarks>
     138    /// <param name="node">The <see cref="XmlNode"/> where the TSP tour is saved.</param>
     139    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    80140    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    81141      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.