Index: lemon/path.h
===================================================================
 lemon/path.h (revision 96)
+++ lemon/path.h (revision 97)
@@ 44,12 +44,13 @@
///
/// In a sense, the path can be treated as a list of arcs. The
 /// lemon path type stores just this list. As a consequence it
 /// cannot enumerate the nodes in the path and the zero length paths
 /// cannot store the source.
+ /// lemon path type stores just this list. As a consequence, it
+ /// cannot enumerate the nodes of the path and the source node of
+ /// a zero length path is undefined.
///
/// This implementation is a back and front insertable and erasable
/// path type. It can be indexed in O(1) time. The front and back
 /// insertion and erasure is amortized O(1) time. The
 /// impelementation is based on two opposite organized vectors.
+ /// insertion and erase is done in O(1) (amortized) time. The
+ /// implementation uses two vectors for storing the front and back
+ /// insertions.
template
class Path {
@@ 66,6 +67,6 @@
/// \brief Template copy constructor
///
 /// This path can be initialized with any other path type. It just
 /// makes a copy of the given path.
+ /// This constuctor initializes the path from any other path type.
+ /// It simply makes a copy of the given path.
template
Path(const CPath& cpath) {
@@ 75,6 +76,5 @@
/// \brief Template copy assignment
///
 /// This path can be initialized with any other path type. It just
 /// makes a copy of the given path.
+ /// This operator makes a copy of a path of any other type.
template
Path& operator=(const CPath& cpath) {
@@ 93,5 +93,5 @@
/// \brief Invalid constructor
ArcIt(Invalid) : path(0), idx(1) {}
 /// \brief Initializate the constructor to the first arc of path
+ /// \brief Initializate the iterator to the first arc of path
ArcIt(const Path &_path)
: path(&_path), idx(_path.empty() ? 1 : 0) {}
@@ 130,11 +130,11 @@
/// \brief Length of the path.
int length() const { return head.size() + tail.size(); }
 /// \brief Returns whether the path is empty.
+ /// \brief Return whether the path is empty.
bool empty() const { return head.empty() && tail.empty(); }
 /// \brief Resets the path to an empty path.
+ /// \brief Reset the path to an empty one.
void clear() { head.clear(); tail.clear(); }
 /// \brief Gives back the nth arc.
+ /// \brief The nth arc.
///
/// \pre n is in the [0..length()  1] range
@@ 144,5 +144,5 @@
}
 /// \brief Initializes arc iterator to point to the nth arc
+ /// \brief Initialize arc iterator to point to the nth arc
///
/// \pre n is in the [0..length()  1] range
@@ 151,5 +151,5 @@
}
 /// \brief Gives back the first arc of the path
+ /// \brief The first arc of the path
const Arc& front() const {
return head.empty() ? tail.front() : head.back();
@@ 176,5 +176,5 @@
}
 /// \brief Gives back the last arc of the path
+ /// \brief The last arc of the path
const Arc& back() const {
return tail.empty() ? head.front() : tail.back();
@@ 200,6 +200,4 @@
}


typedef True BuildTag;
@@ 324,11 +322,11 @@
/// \brief Length of the path.
int length() const { return data.size(); }
 /// \brief Returns whether the path is empty.
+ /// \brief Return true if the path is empty.
bool empty() const { return data.empty(); }
 /// \brief Resets the path to an empty path.
+ /// \brief Reset the path to an empty one.
void clear() { data.clear(); }
 /// \brief Gives back the nth arc.
+ /// \brief The nth arc.
///
/// \pre n is in the [0..length()  1] range
@@ 342,10 +340,10 @@
}
 /// \brief Gives back the first arc of the path.
+ /// \brief The first arc of the path.
const Arc& front() const {
return data.front();
}
 /// \brief Gives back the last arc of the path.
+ /// \brief The last arc of the path.
const Arc& back() const {
return data.back();
@@ 507,7 +505,7 @@
};
 /// \brief Gives back the nth arc.
 ///
 /// Gives back the nth arc in O(n) time.
+ /// \brief The nth arc.
+ ///
+ /// This function looks for the nth arc in O(n) time.
/// \pre n is in the [0..length()  1] range
const Arc& nth(int n) const {
@@ 539,8 +537,8 @@
}
 /// \brief Returns whether the path is empty.
+ /// \brief Return true if the path is empty.
bool empty() const { return first == 0; }
 /// \brief Resets the path to an empty path.
+ /// \brief Reset the path to an empty one.
void clear() {
while (first != 0) {
@@ 552,5 +550,5 @@
}
 /// \brief Gives back the first arc of the path
+ /// \brief The first arc of the path
const Arc& front() const {
return first>arc;
@@ 585,5 +583,5 @@
}
 /// \brief Gives back the last arc of the path.
+ /// \brief The last arc of the path.
const Arc& back() const {
return last>arc;
@@ 618,7 +616,7 @@
}
 /// \brief Splicing the given path to the current path.
 ///
 /// It splices the \c tpath to the back of the current path and \c
+ /// \brief Splice a path to the back of the current path.
+ ///
+ /// It splices \c tpath to the back of the current path and \c
/// tpath becomes empty. The time complexity of this function is
/// O(1).
@@ 637,7 +635,7 @@
}
 /// \brief Splicing the given path to the current path.
 ///
 /// It splices the \c tpath before the current path and \c tpath
+ /// \brief Splice a path to the front of the current path.
+ ///
+ /// It splices \c tpath before the current path and \c tpath
/// becomes empty. The time complexity of this function
/// is O(1).
@@ 656,10 +654,10 @@
}
 /// \brief Splicing the given path into the current path.
+ /// \brief Splice a path into the current path.
///
/// It splices the \c tpath into the current path before the
/// position of \c it iterator and \c tpath becomes empty. The
 /// time complexity of this function is O(1). If the \c it is \c
 /// INVALID then it will splice behind the current path.
+ /// time complexity of this function is O(1). If the \c it is
+ /// \c INVALID then it will splice behind the current path.
void splice(ArcIt it, ListPath& tpath) {
if (it.node) {
@@ 689,13 +687,13 @@
}
 /// \brief Spliting the current path.
 ///
 /// It splits the current path into two parts. The part before \c
 /// it iterator will remain in the current path and the part from
 /// the it will put into the \c tpath. If the \c tpath had arcs
 /// before the operation they will be removed first. The time
 /// complexity of this function is O(1) plus the clearing of \c
 /// tpath. If the \c it is \c INVALID then it just clears \c
 /// tpath.
+ /// \brief Split the current path.
+ ///
+ /// It splits the current path into two parts. The part before
+ /// the iterator \c it will remain in the current path and the part
+ /// starting with
+ /// \c it will put into \c tpath. If \c tpath have arcs
+ /// before the operation they are removed first. The time
+ /// complexity of this function is O(1) plus the the time of emtying
+ /// \c tpath. If \c it is \c INVALID then it just clears \c tpath
void split(ArcIt it, ListPath& tpath) {
tpath.clear();
@@ 739,11 +737,14 @@
/// In a sense, the path can be treated as a list of arcs. The
/// lemon path type stores just this list. As a consequence it
 /// cannot enumerate the nodes in the path and the zero length paths
 /// cannot store the source.
 ///
 /// This implementation is completly static, so it cannot be
 /// modified exclude the assign an other path. It is intented to be
 /// used when you want to store a large number of paths because it is
 /// the most memory efficient path type in the lemon.
+ /// cannot enumerate the nodes in the path and the source node of
+ /// a zero length path is undefined.
+ ///
+ /// This implementation is completly static, i.e. it can be copy constucted
+ /// or copy assigned from another path, but otherwise it cannot be
+ /// modified.
+ ///
+ /// Being the the most memory efficient path type in LEMON,
+ /// it is intented to be
+ /// used when you want to store a large number of paths.
template
class StaticPath {
@@ 760,6 +761,5 @@
/// \brief Template copy constructor
///
 /// This path can be initialized with any other path type. It just
 /// makes a copy of the given path.
+ /// This path can be initialized from any other path type.
template
StaticPath(const CPath& cpath) : arcs(0) {
@@ 776,5 +776,5 @@
/// \brief Template copy assignment
///
 /// This path can be initialized with any other path type. It just
+ /// This path can be made equal to any other path type. It simply
/// makes a copy of the given path.
template
@@ 832,5 +832,5 @@
};
 /// \brief Gives back the nth arc.
+ /// \brief The nth arc.
///
/// \pre n is in the [0..length()  1] range
@@ 839,16 +839,16 @@
}
 /// \brief Initializes arc iterator to point to the nth arc.
+ /// \brief The arc iterator pointing to the nth arc.
ArcIt nthIt(int n) const {
return ArcIt(*this, n);
}
 /// \brief Gives back the length of the path.
+ /// \brief The length of the path.
int length() const { return len; }
 /// \brief Returns true when the path is empty.
+ /// \brief Return true when the path is empty.
int empty() const { return len == 0; }
 /// \break Erase all arc in the digraph.
+ /// \break Erase all arcs in the digraph.
void clear() {
len = 0;
@@ 857,10 +857,10 @@
}
 /// \brief Gives back the first arc of the path.
+ /// \brief The first arc of the path.
const Arc& front() const {
return arcs[0];
}
 /// \brief Gives back the last arc of the path.
+ /// \brief The last arc of the path.
const Arc& back() const {
return arcs[len  1];
Index: lemon/path_utils.h
===================================================================
 lemon/path_utils.h (revision 96)
+++ lemon/path_utils.h (revision 97)
@@ 91,7 +91,7 @@
 /// \brief Make of copy of a path.
 ///
 /// Make of copy of a path.
+ /// \brief Make a copy of a path.
+ ///
+ /// This function makes a copy of a path.
template
void copyPath(Target& target, const Source& source) {
@@ 100,7 +100,8 @@
}
 /// \brief Checks the path's consistency.
 ///
 /// Checks that each arc's target is the next's source.
+ /// \brief Check the consistency of a path.
+ ///
+ /// This function checks that the target of each arc is the same
+ /// as the source of the next one.
///
template
@@ 118,7 +119,7 @@
}
 /// \brief Gives back the source of the path
 ///
 /// Gives back the source of the path.
+ /// \brief The source of a path
+ ///
+ /// This function returns the source of the given path.
template
typename Digraph::Node pathSource(const Digraph& digraph, const Path& path) {
@@ 126,7 +127,7 @@
}
 /// \brief Gives back the target of the path
 ///
 /// Gives back the target of the path.
+ /// \brief The target of a path
+ ///
+ /// This function returns the target of the given path.
template
typename Digraph::Node pathTarget(const Digraph& digraph, const Path& path) {
@@ 134,13 +135,13 @@
}
 /// \brief Class which helps to iterate the nodes of a path
+ /// \brief Class which helps to iterate through the nodes of a path
///
/// In a sense, the path can be treated as a list of arcs. The
 /// lemon path type stores just this list. As a consequence it
+ /// lemon path type stores only this list. As a consequence, it
/// cannot enumerate the nodes in the path and the zero length paths
 /// cannot store the node.
+ /// cannot have a source node.
///
/// This class implements the node iterator of a path structure. To
 /// provide this feature, the underlying digraph should be given to
+ /// provide this feature, the underlying digraph should be passed to
/// the constructor of the iterator.
template