lemon/path.h
changeset 784 1a7fe3bef514
parent 505 c6acc34f98dc
parent 751 f5f260a63a9b
child 803 1b89e29c9fc7
     1.1 --- a/lemon/path.h	Fri Oct 16 10:21:37 2009 +0200
     1.2 +++ b/lemon/path.h	Thu Nov 05 15:50:01 2009 +0100
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2008
     1.8 + * Copyright (C) 2003-2009
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -40,7 +40,7 @@
    1.13    /// \brief A structure for representing directed paths in a digraph.
    1.14    ///
    1.15    /// A structure for representing directed path in a digraph.
    1.16 -  /// \tparam _Digraph The digraph type in which the path is.
    1.17 +  /// \tparam GR The digraph type in which the path is.
    1.18    ///
    1.19    /// In a sense, the path can be treated as a list of arcs. The
    1.20    /// lemon path type stores just this list. As a consequence, it
    1.21 @@ -52,11 +52,11 @@
    1.22    /// insertion and erase is done in O(1) (amortized) time. The
    1.23    /// implementation uses two vectors for storing the front and back
    1.24    /// insertions.
    1.25 -  template <typename _Digraph>
    1.26 +  template <typename GR>
    1.27    class Path {
    1.28    public:
    1.29  
    1.30 -    typedef _Digraph Digraph;
    1.31 +    typedef GR Digraph;
    1.32      typedef typename Digraph::Arc Arc;
    1.33  
    1.34      /// \brief Default constructor
    1.35 @@ -137,7 +137,7 @@
    1.36  
    1.37      /// \brief The nth arc.
    1.38      ///
    1.39 -    /// \pre n is in the [0..length() - 1] range
    1.40 +    /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
    1.41      const Arc& nth(int n) const {
    1.42        return n < int(head.size()) ? *(head.rbegin() + n) :
    1.43          *(tail.begin() + (n - head.size()));
    1.44 @@ -145,7 +145,7 @@
    1.45  
    1.46      /// \brief Initialize arc iterator to point to the nth arc
    1.47      ///
    1.48 -    /// \pre n is in the [0..length() - 1] range
    1.49 +    /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
    1.50      ArcIt nthIt(int n) const {
    1.51        return ArcIt(*this, n);
    1.52      }
    1.53 @@ -228,7 +228,7 @@
    1.54    /// \brief A structure for representing directed paths in a digraph.
    1.55    ///
    1.56    /// A structure for representing directed path in a digraph.
    1.57 -  /// \tparam _Digraph The digraph type in which the path is.
    1.58 +  /// \tparam GR The digraph type in which the path is.
    1.59    ///
    1.60    /// In a sense, the path can be treated as a list of arcs. The
    1.61    /// lemon path type stores just this list. As a consequence it
    1.62 @@ -240,11 +240,11 @@
    1.63    /// erasure is amortized O(1) time. This implementation is faster
    1.64    /// then the \c Path type because it use just one vector for the
    1.65    /// arcs.
    1.66 -  template <typename _Digraph>
    1.67 +  template <typename GR>
    1.68    class SimplePath {
    1.69    public:
    1.70  
    1.71 -    typedef _Digraph Digraph;
    1.72 +    typedef GR Digraph;
    1.73      typedef typename Digraph::Arc Arc;
    1.74  
    1.75      /// \brief Default constructor
    1.76 @@ -329,7 +329,7 @@
    1.77  
    1.78      /// \brief The nth arc.
    1.79      ///
    1.80 -    /// \pre n is in the [0..length() - 1] range
    1.81 +    /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
    1.82      const Arc& nth(int n) const {
    1.83        return data[n];
    1.84      }
    1.85 @@ -392,7 +392,7 @@
    1.86    /// \brief A structure for representing directed paths in a digraph.
    1.87    ///
    1.88    /// A structure for representing directed path in a digraph.
    1.89 -  /// \tparam _Digraph The digraph type in which the path is.
    1.90 +  /// \tparam GR The digraph type in which the path is.
    1.91    ///
    1.92    /// In a sense, the path can be treated as a list of arcs. The
    1.93    /// lemon path type stores just this list. As a consequence it
    1.94 @@ -404,11 +404,11 @@
    1.95    /// of the arc in the path. The length can be computed in O(n)
    1.96    /// time. The front and back insertion and erasure is O(1) time
    1.97    /// and it can be splited and spliced in O(1) time.
    1.98 -  template <typename _Digraph>
    1.99 +  template <typename GR>
   1.100    class ListPath {
   1.101    public:
   1.102  
   1.103 -    typedef _Digraph Digraph;
   1.104 +    typedef GR Digraph;
   1.105      typedef typename Digraph::Arc Arc;
   1.106  
   1.107    protected:
   1.108 @@ -507,7 +507,7 @@
   1.109      /// \brief The nth arc.
   1.110      ///
   1.111      /// This function looks for the nth arc in O(n) time.
   1.112 -    /// \pre n is in the [0..length() - 1] range
   1.113 +    /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
   1.114      const Arc& nth(int n) const {
   1.115        Node *node = first;
   1.116        for (int i = 0; i < n; ++i) {
   1.117 @@ -732,7 +732,7 @@
   1.118    /// \brief A structure for representing directed paths in a digraph.
   1.119    ///
   1.120    /// A structure for representing directed path in a digraph.
   1.121 -  /// \tparam _Digraph The digraph type in which the path is.
   1.122 +  /// \tparam GR The digraph type in which the path is.
   1.123    ///
   1.124    /// In a sense, the path can be treated as a list of arcs. The
   1.125    /// lemon path type stores just this list. As a consequence it
   1.126 @@ -746,11 +746,11 @@
   1.127    /// Being the the most memory efficient path type in LEMON,
   1.128    /// it is intented to be
   1.129    /// used when you want to store a large number of paths.
   1.130 -  template <typename _Digraph>
   1.131 +  template <typename GR>
   1.132    class StaticPath {
   1.133    public:
   1.134  
   1.135 -    typedef _Digraph Digraph;
   1.136 +    typedef GR Digraph;
   1.137      typedef typename Digraph::Arc Arc;
   1.138  
   1.139      /// \brief Default constructor
   1.140 @@ -833,7 +833,7 @@
   1.141  
   1.142      /// \brief The nth arc.
   1.143      ///
   1.144 -    /// \pre n is in the [0..length() - 1] range
   1.145 +    /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
   1.146      const Arc& nth(int n) const {
   1.147        return arcs[n];
   1.148      }