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