COIN-OR::LEMON - Graph Library

Changeset 1420:1f4f01870c1e in lemon for lemon/path.h


Ignore:
Timestamp:
02/17/18 23:44:15 (14 months ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

API doc improvements for Path structures (#250)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/path.h

    r1336 r1420  
    4444  /// \tparam GR The digraph type in which the path is.
    4545  ///
    46   /// In a sense, the path can be treated as a list of arcs. The
    47   /// LEMON path type stores just this list. As a consequence, it
    48   /// cannot enumerate the nodes of the path and the source node of
    49   /// a zero length path is undefined.
     46  /// In a sense, a path can be treated as a list of arcs. The
     47  /// LEMON path type simply stores this list. As a consequence, it
     48  /// cannot enumerate the nodes in the path, and the source node of
     49  /// a zero-length path is undefined.
    5050  ///
    5151  /// This implementation is a back and front insertable and erasable
     
    169169    /// \brief The n-th arc.
    170170    ///
    171     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
     171    /// Gives back the n-th arc. This function runs in O(1) time.
     172    /// \pre \c n is in the range <tt>[0..length() - 1]</tt>.
    172173    const Arc& nth(int n) const {
    173174      return n < int(head.size()) ? *(head.rbegin() + n) :
     
    262263  /// \tparam GR The digraph type in which the path is.
    263264  ///
    264   /// In a sense, the path can be treated as a list of arcs. The
    265   /// LEMON path type stores just this list. As a consequence it
    266   /// cannot enumerate the nodes in the path and the zero length paths
    267   /// cannot store the source.
     265  /// In a sense, a path can be treated as a list of arcs. The
     266  /// LEMON path type simply stores this list. As a consequence, it
     267  /// cannot enumerate the nodes in the path, and the source node of
     268  /// a zero-length path is undefined.
    268269  ///
    269270  /// This implementation is a just back insertable and erasable path
    270271  /// type. It can be indexed in O(1) time. The back insertion and
    271272  /// erasure is amortized O(1) time. This implementation is faster
    272   /// then the \c Path type because it use just one vector for the
     273  /// than the \c Path type because it use just one vector for the
    273274  /// arcs.
    274275  template <typename GR>
     
    391392    /// \brief The n-th arc.
    392393    ///
    393     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
     394    /// Gives back the n-th arc. This function runs in O(1) time.
     395    /// \pre \c n is in the range <tt>[0..length() - 1]</tt>.
    394396    const Arc& nth(int n) const {
    395397      return data[n];
     
    456458  /// \tparam GR The digraph type in which the path is.
    457459  ///
    458   /// In a sense, the path can be treated as a list of arcs. The
    459   /// LEMON path type stores just this list. As a consequence it
    460   /// cannot enumerate the nodes in the path and the zero length paths
    461   /// cannot store the source.
     460  /// In a sense, a path can be treated as a list of arcs. The
     461  /// LEMON path type simply stores this list. As a consequence, it
     462  /// cannot enumerate the nodes in the path, and the source node of
     463  /// a zero-length path is undefined.
    462464  ///
    463465  /// This implementation is a back and front insertable and erasable
     
    599601    ///
    600602    /// This function looks for the n-th arc in O(n) time.
    601     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
     603    /// \pre \c n is in the range <tt>[0..length() - 1]</tt>.
    602604    const Arc& nth(int n) const {
    603605      Node *node = first;
     
    785787    /// \c it will put into \c tpath. If \c tpath have arcs
    786788    /// before the operation they are removed first.  The time
    787     /// complexity of this function is O(1) plus the the time of emtying
     789    /// complexity of this function is O(1) plus the time of emtying
    788790    /// \c tpath. If \c it is \c INVALID then it just clears \c tpath
    789791    void split(ArcIt it, ListPath& tpath) {
     
    826828  /// \tparam GR The digraph type in which the path is.
    827829  ///
    828   /// In a sense, the path can be treated as a list of arcs. The
    829   /// LEMON path type stores just this list. As a consequence it
    830   /// cannot enumerate the nodes in the path and the source node of
    831   /// a zero length path is undefined.
     830  /// In a sense, a path can be treated as a list of arcs. The
     831  /// LEMON path type simply stores this list. As a consequence, it
     832  /// cannot enumerate the nodes in the path, and the source node of
     833  /// a zero-length path is undefined.
    832834  ///
    833835  /// This implementation is completly static, i.e. it can be copy constucted
     
    835837  /// modified.
    836838  ///
    837   /// Being the the most memory efficient path type in LEMON,
    838   /// it is intented to be
    839   /// used when you want to store a large number of paths.
     839  /// Being the most memory-efficient path type in LEMON, it is
     840  /// intented to be used when you want to store a large number of paths.
    840841  template <typename GR>
    841842  class StaticPath {
     
    955956    /// \brief The n-th arc.
    956957    ///
    957     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
     958    /// Gives back the n-th arc. This function runs in O(1) time.
     959    /// \pre \c n is in the range <tt>[0..length() - 1]</tt>.
    958960    const Arc& nth(int n) const {
    959961      return _arcs[n];
     
    971973    int empty() const { return len == 0; }
    972974
    973     /// \brief Erase all arcs in the digraph.
     975    /// \brief Reset the path to an empty one.
    974976    void clear() {
    975977      len = 0;
     
    11611163  }
    11621164
    1163   /// \brief Class which helps to iterate through the nodes of a path
    1164   ///
    1165   /// In a sense, the path can be treated as a list of arcs. The
    1166   /// LEMON path type stores only this list. As a consequence, it
    1167   /// cannot enumerate the nodes in the path and the zero length paths
    1168   /// cannot have a source node.
    1169   ///
    1170   /// This class implements the node iterator of a path structure. To
    1171   /// provide this feature, the underlying digraph should be passed to
     1165  /// \brief Class for iterating through the nodes of a path
     1166  ///
     1167  /// Class for iterating through the nodes of a path.
     1168  ///
     1169  /// In a sense, a path can be treated as a list of arcs. The
     1170  /// LEMON path type simply stores this list. As a consequence, it
     1171  /// cannot enumerate the nodes in the path, and the source node of
     1172  /// a zero-length path is undefined.
     1173  ///
     1174  /// However, this class implements a node iterator for path structures.
     1175  /// To provide this feature, the underlying digraph should be passed to
    11721176  /// the constructor of the iterator.
    11731177  template <typename Path>
Note: See TracChangeset for help on using the changeset viewer.