[Lemon-commits] Alpar Juttner: Merge
Lemon HG
hg at lemon.cs.elte.hu
Wed Nov 18 14:46:39 CET 2009
details: http://lemon.cs.elte.hu/hg/lemon/rev/c92296660262
changeset: 852:c92296660262
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Wed Nov 18 14:38:02 2009 +0100
description:
Merge
diffstat:
doc/min_cost_flow.dox | 4 +-
lemon/bellman_ford.h | 6 +-
lemon/bfs.h | 4 +-
lemon/circulation.h | 2 +-
lemon/concepts/digraph.h | 8 ++--
lemon/concepts/graph.h | 16 ++++----
lemon/concepts/graph_components.h | 2 +-
lemon/concepts/path.h | 85 ++++++++++++++++++++++--------------------
lemon/counter.h | 2 +-
lemon/dfs.h | 4 +-
lemon/dijkstra.h | 8 ++--
lemon/gomory_hu.h | 6 +--
lemon/graph_to_eps.h | 8 ++--
lemon/hypercube_graph.h | 2 +-
lemon/lgf_reader.h | 4 +-
lemon/list_graph.h | 10 ++--
lemon/lp_base.h | 4 +-
lemon/maps.h | 20 +++++-----
lemon/network_simplex.h | 30 +++++++-------
lemon/preflow.h | 2 +-
lemon/time_measure.h | 2 +-
lemon/unionfind.h | 2 +-
22 files changed, 116 insertions(+), 115 deletions(-)
diffs (truncated from 853 to 300 lines):
diff --git a/doc/min_cost_flow.dox b/doc/min_cost_flow.dox
--- a/doc/min_cost_flow.dox
+++ b/doc/min_cost_flow.dox
@@ -78,7 +78,7 @@
- if \f$lower(uv)<f(uv)<upper(uv)\f$, then \f$cost^\pi(uv)=0\f$;
- if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$.
- For all \f$u\in V\f$ nodes:
- - \f$\pi(u)<=0\f$;
+ - \f$\pi(u)\leq 0\f$;
- if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
then \f$\pi(u)=0\f$.
@@ -145,7 +145,7 @@
- if \f$lower(uv)<f(uv)<upper(uv)\f$, then \f$cost^\pi(uv)=0\f$;
- if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$.
- For all \f$u\in V\f$ nodes:
- - \f$\pi(u)>=0\f$;
+ - \f$\pi(u)\geq 0\f$;
- if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
then \f$\pi(u)=0\f$.
diff --git a/lemon/bellman_ford.h b/lemon/bellman_ford.h
--- a/lemon/bellman_ford.h
+++ b/lemon/bellman_ford.h
@@ -300,7 +300,7 @@
///
/// \ref named-templ-param "Named parameter" for setting
/// \c OperationTraits type.
- /// For more information see \ref BellmanFordDefaultOperationTraits.
+ /// For more information, see \ref BellmanFordDefaultOperationTraits.
template <class T>
struct SetOperationTraits
: public BellmanFord< Digraph, LengthMap, SetOperationTraitsTraits<T> > {
@@ -718,7 +718,7 @@
/// is not reached from the root(s) or if \c v is a root.
///
/// The shortest path tree used here is equal to the shortest path
- /// tree used in \ref predNode() and \predMap().
+ /// tree used in \ref predNode() and \ref predMap().
///
/// \pre Either \ref run() or \ref init() must be called before
/// using this function.
@@ -733,7 +733,7 @@
/// is not reached from the root(s) or if \c v is a root.
///
/// The shortest path tree used here is equal to the shortest path
- /// tree used in \ref predArc() and \predMap().
+ /// tree used in \ref predArc() and \ref predMap().
///
/// \pre Either \ref run() or \ref init() must be called before
/// using this function.
diff --git a/lemon/bfs.h b/lemon/bfs.h
--- a/lemon/bfs.h
+++ b/lemon/bfs.h
@@ -63,7 +63,7 @@
///The type of the map that indicates which nodes are processed.
///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
- ///By default it is a NullMap.
+ ///By default, it is a NullMap.
typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
///Instantiates a \c ProcessedMap.
@@ -848,7 +848,7 @@
///The type of the map that indicates which nodes are processed.
///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
- ///By default it is a NullMap.
+ ///By default, it is a NullMap.
typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
///Instantiates a ProcessedMap.
diff --git a/lemon/circulation.h b/lemon/circulation.h
--- a/lemon/circulation.h
+++ b/lemon/circulation.h
@@ -306,7 +306,7 @@
/// The Elevator should have standard constructor interface to be
/// able to automatically created by the algorithm (i.e. the
/// digraph and the maximum level should be passed to it).
- /// However an external elevator object could also be passed to the
+ /// However, an external elevator object could also be passed to the
/// algorithm with the \ref elevator(Elevator&) "elevator()" function
/// before calling \ref run() or \ref init().
/// \sa SetElevator
diff --git a/lemon/concepts/digraph.h b/lemon/concepts/digraph.h
--- a/lemon/concepts/digraph.h
+++ b/lemon/concepts/digraph.h
@@ -107,7 +107,7 @@
/// Iterator class for the nodes.
/// This iterator goes through each node of the digraph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of nodes in a digraph \c g of type \c %Digraph like this:
///\code
/// int count=0;
@@ -196,7 +196,7 @@
/// This iterator goes trough the \e outgoing arcs of a certain node
/// of a digraph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of outgoing arcs of a node \c n
/// in a digraph \c g of type \c %Digraph as follows.
///\code
@@ -241,7 +241,7 @@
/// This iterator goes trough the \e incoming arcs of a certain node
/// of a digraph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of incoming arcs of a node \c n
/// in a digraph \c g of type \c %Digraph as follows.
///\code
@@ -285,7 +285,7 @@
/// Iterator class for the arcs.
/// This iterator goes through each arc of the digraph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of arcs in a digraph \c g of type \c %Digraph as follows:
///\code
/// int count=0;
diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h
--- a/lemon/concepts/graph.h
+++ b/lemon/concepts/graph.h
@@ -140,7 +140,7 @@
/// Iterator class for the nodes.
/// This iterator goes through each node of the graph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of nodes in a graph \c g of type \c %Graph like this:
///\code
/// int count=0;
@@ -228,7 +228,7 @@
/// Iterator class for the edges.
/// This iterator goes through each edge of the graph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of edges in a graph \c g of type \c %Graph as follows:
///\code
/// int count=0;
@@ -272,7 +272,7 @@
/// This iterator goes trough the incident undirected edges
/// of a certain node of a graph.
- /// Its usage is quite simple, for example you can compute the
+ /// Its usage is quite simple, for example, you can compute the
/// degree (i.e. the number of incident edges) of a node \c n
/// in a graph \c g of type \c %Graph as follows.
///
@@ -369,7 +369,7 @@
/// Iterator class for the arcs.
/// This iterator goes through each directed arc of the graph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of arcs in a graph \c g of type \c %Graph as follows:
///\code
/// int count=0;
@@ -413,7 +413,7 @@
/// This iterator goes trough the \e outgoing directed arcs of a
/// certain node of a graph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of outgoing arcs of a node \c n
/// in a graph \c g of type \c %Graph as follows.
///\code
@@ -461,7 +461,7 @@
/// This iterator goes trough the \e incoming directed arcs of a
/// certain node of a graph.
- /// Its usage is quite simple, for example you can count the number
+ /// Its usage is quite simple, for example, you can count the number
/// of incoming arcs of a node \c n
/// in a graph \c g of type \c %Graph as follows.
///\code
@@ -587,7 +587,7 @@
///
/// Returns the first node of the given edge.
///
- /// Edges don't have source and target nodes, however methods
+ /// Edges don't have source and target nodes, however, methods
/// u() and v() are used to query the two end-nodes of an edge.
/// The orientation of an edge that arises this way is called
/// the inherent direction, it is used to define the default
@@ -600,7 +600,7 @@
///
/// Returns the second node of the given edge.
///
- /// Edges don't have source and target nodes, however methods
+ /// Edges don't have source and target nodes, however, methods
/// u() and v() are used to query the two end-nodes of an edge.
/// The orientation of an edge that arises this way is called
/// the inherent direction, it is used to define the default
diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h
--- a/lemon/concepts/graph_components.h
+++ b/lemon/concepts/graph_components.h
@@ -18,7 +18,7 @@
///\ingroup graph_concepts
///\file
-///\brief The concept of graph components.
+///\brief The concepts of graph components.
#ifndef LEMON_CONCEPTS_GRAPH_COMPONENTS_H
#define LEMON_CONCEPTS_GRAPH_COMPONENTS_H
diff --git a/lemon/concepts/path.h b/lemon/concepts/path.h
--- a/lemon/concepts/path.h
+++ b/lemon/concepts/path.h
@@ -18,7 +18,7 @@
///\ingroup concept
///\file
-///\brief Classes for representing paths in digraphs.
+///\brief The concept of paths
///
#ifndef LEMON_CONCEPTS_PATH_H
@@ -38,13 +38,22 @@
///
/// A skeleton structure for representing directed paths in a
/// digraph.
+ /// In a sense, a path can be treated as a list of arcs.
+ /// LEMON path types just store this list. As a consequence, they cannot
+ /// enumerate the nodes on the path directly and a zero length path
+ /// cannot store its source node.
+ ///
+ /// The arcs of a path should be stored in the order of their directions,
+ /// i.e. the target node of each arc should be the same as the source
+ /// node of the next arc. This consistency could be checked using
+ /// \ref checkPath().
+ /// The source and target nodes of a (consistent) path can be obtained
+ /// using \ref pathSource() and \ref pathTarget().
+ ///
+ /// A path can be constructed from another path of any type using the
+ /// copy constructor or the assignment operator.
+ ///
/// \tparam GR The digraph type in which the path is.
- ///
- /// 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.
- ///
template <typename GR>
class Path {
public:
@@ -59,18 +68,18 @@
/// \brief Default constructor
Path() {}
- /// \brief Template constructor
+ /// \brief Template copy constructor
template <typename CPath>
Path(const CPath& cpath) {}
- /// \brief Template assigment
+ /// \brief Template assigment operator
template <typename CPath>
Path& operator=(const CPath& cpath) {
ignore_unused_variable_warning(cpath);
return *this;
}
- /// Length of the path ie. the number of arcs in the path.
+ /// Length of the path, i.e. the number of arcs on the path.
int length() const { return 0;}
/// Returns whether the path is empty.
@@ -79,19 +88,19 @@
/// Resets the path to an empty path.
void clear() {}
- /// \brief LEMON style iterator for path arcs
+ /// \brief LEMON style iterator for enumerating the arcs of a path.
///
- /// This class is used to iterate on the arcs of the paths.
+ /// LEMON style iterator class for enumerating the arcs of a path.
class ArcIt {
public:
/// Default constructor
ArcIt() {}
/// Invalid constructor
ArcIt(Invalid) {}
- /// Constructor for first arc
+ /// Sets the iterator to the first arc of the given path
ArcIt(const Path &) {}
- /// Conversion to Arc
+ /// Conversion to \c Arc
operator Arc() const { return INVALID; }
/// Next arc
@@ -192,24 +201,18 @@
/// \brief A skeleton structure for path dumpers.
///
More information about the Lemon-commits
mailing list