[Lemon-commits] [lemon_svn] athos: r2014 - in hugo/trunk: doc lemon lemon/concept
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:31 CET 2006
Author: athos
Date: Fri Jul 1 12:33:27 2005
New Revision: 2014
Modified:
hugo/trunk/doc/graph_io.dox
hugo/trunk/lemon/concept/sym_graph.h
hugo/trunk/lemon/min_cost_flow.h
hugo/trunk/lemon/suurballe.h
Log:
Doc review+corrections in my own documentation according to the reviewers comments.
Modified: hugo/trunk/doc/graph_io.dox
==============================================================================
--- hugo/trunk/doc/graph_io.dox (original)
+++ hugo/trunk/doc/graph_io.dox Fri Jul 1 12:33:27 2005
@@ -206,12 +206,13 @@
reader.run();
\endcode
-\section types The background of Reading and Writing
-The \c GraphReader should know how to read a Value from the given map.
+\section types Background of Reading and Writing
+To read a map (on the nodes or edges)
+the \c GraphReader should know how to read a Value from the given map.
By the default implementation the input operator reads a value from
the stream and the type of the readed value is the value type of the given map.
When the reader should skip a value in the stream, because you do not
-want to store it in map, the reader skips a character sequence without
+want to store it in a map, the reader skips a character sequence without
whitespace.
If you want to change the functionality of the reader, you can use
@@ -229,7 +230,7 @@
};
\endcode
-By example, the \c "strings" nodemap contains strings and you do not need
+For example, the \c "strings" nodemap contains strings and you do not need
the value of the string just the length. Then you can implement own Reader
struct.
@@ -253,7 +254,7 @@
should provide an inner template class Reader for each type, and an
DefaultReader for skipping a value.
-The specialization of the writing should be very similar to the reading.
+The specialization of writing should be very similar to that of reading.
\author Balazs Dezso
*/
Modified: hugo/trunk/lemon/concept/sym_graph.h
==============================================================================
--- hugo/trunk/lemon/concept/sym_graph.h (original)
+++ hugo/trunk/lemon/concept/sym_graph.h Fri Jul 1 12:33:27 2005
@@ -42,8 +42,8 @@
/// It can be used for checking the interface compatibility,
/// or it can serve as a skeleton of a new symmetric graph structure.
///
- /// Also, you will find here the full documentation of a certain graph
- /// feature, the documentation of a real symmetric graph imlementation
+ /// Also, you will find here the full documentation of graph
+ /// features, the documentation of a real symmetric graph imlementation
/// like @ref SymListGraph or
/// @ref lemon::SymSmartGraph will just refer to this structure.
class StaticSymGraph
@@ -54,7 +54,7 @@
/// Default constructor.
///
StaticSymGraph() { }
- ///Copy consructor.
+ // ///Copy consructor.
// ///\todo It is not clear, what we expect from a copy constructor.
// ///E.g. How to assign the nodes/edges to each other? What about maps?
@@ -93,7 +93,7 @@
/// Inequality operator
- /// \sa operator==(Node n)
+ /// \sa operator==(Node)
///
bool operator!=(Node) const { return true; }
@@ -141,9 +141,9 @@
/// Node -> NodeIt conversion.
/// Sets the iterator to the node of \c g pointed by the trivial
- /// iterator n.
+ /// iterator \c n.
/// This feature necessitates that each time we
- /// iterate the edge-set, the iteration order is the same.
+ /// iterate the node-set, the iteration order is the same.
NodeIt(const StaticSymGraph& g, const Node& n) { }
/// Next node.
@@ -267,8 +267,8 @@
OutEdgeIt(Invalid) { }
/// This constructor sets the iterator to first outgoing edge.
- /// This constructor set the iterator to the first outgoing edge of
- /// node
+ /// This constructor sets the iterator to the first outgoing edge of
+ /// the node
///@param n the node
///@param g the graph
OutEdgeIt(const StaticSymGraph& g, const Node& n) { }
@@ -316,8 +316,8 @@
InEdgeIt(Invalid) { }
/// This constructor sets the iterator to first incoming edge.
- /// This constructor set the iterator to the first incoming edge of
- /// node
+ /// This constructor sets the iterator to the first incoming edge of
+ /// the node
///@param n the node
///@param g the graph
InEdgeIt(const StaticSymGraph& g, const Node& n) { }
@@ -361,8 +361,8 @@
SymEdgeIt(Invalid) { }
/// This constructor sets the iterator to first edge.
- /// This constructor set the iterator to the first edge of
- /// node
+ /// This constructor sets the iterator to the first edge of
+ /// the graph
///@param g the graph
SymEdgeIt(const StaticSymGraph& g) { }
/// Edge -> EdgeIt conversion
@@ -405,8 +405,8 @@
EdgeIt(Invalid) { }
/// This constructor sets the iterator to first edge.
- /// This constructor set the iterator to the first edge of
- /// node
+ /// This constructor sets the iterator to the first edge of
+ /// the graph
///@param g the graph
EdgeIt(const StaticSymGraph& g) { }
/// Edge -> EdgeIt conversion
@@ -589,10 +589,10 @@
/// An empty non-static graph class.
- /// This class provides everything that \ref StaticGraph
- /// with additional functionality which enables to build a
+ /// This class is an extension of \ref StaticGraph
+ /// with additional functionality that enables one to build a
/// graph from scratch.
- class ExtendableSymGraph : public StaticSymGraph
+ class ExtendableSymGraph : public StaticSymGraph
{
public:
/// Default constructor.
@@ -622,8 +622,8 @@
/// An empty erasable graph class.
- /// This class is an extension of \ref ExtendableGraph. It also makes it
- /// possible to erase edges or nodes.
+ /// This class is an extension of \ref ExtendableGraph. It is also
+ /// possible to erase edges or nodes in this graph.
class ErasableSymGraph : public ExtendableSymGraph
{
public:
Modified: hugo/trunk/lemon/min_cost_flow.h
==============================================================================
--- hugo/trunk/lemon/min_cost_flow.h (original)
+++ hugo/trunk/lemon/min_cost_flow.h Fri Jul 1 12:33:27 2005
@@ -38,16 +38,16 @@
///
/// The class \ref lemon::MinCostFlow "MinCostFlow" implements an
/// algorithm for finding a flow of value \c k having minimal total
- /// cost from a given source node to a given target node in an
- /// edge-weighted directed graph. To this end, the edge-capacities
- /// and edge-weights have to be nonnegative. The edge-capacities
- /// should be integers, but the edge-weights can be integers, reals
- /// or of other comparable numeric type. This algorithm is intended
- /// to be used only for small values of \c k, since it is only
- /// polynomial in k, not in the length of k (which is log k): in
- /// order to find the minimum cost flow of value \c k it finds the
- /// minimum cost flow of value \c i for every \c i between 0 and \c
- /// k.
+ /// cost from a given source node to a given target node in a
+ /// directed graph with a cost function on the edges. To
+ /// this end, the edge-capacities and edge-costs have to be
+ /// nonnegative. The edge-capacities should be integers, but the
+ /// edge-costs can be integers, reals or of other comparable
+ /// numeric type. This algorithm is intended to be used only for
+ /// small values of \c k, since it is only polynomial in k, not in
+ /// the length of k (which is log k): in order to find the minimum
+ /// cost flow of value \c k it finds the minimum cost flow of value
+ /// \c i for every \c i between 0 and \c k.
///
///\param Graph The directed graph type the algorithm runs on.
///\param LengthMap The type of the length map.
@@ -117,7 +117,7 @@
/*! \brief The constructor of the class.
\param _g The directed graph the algorithm runs on.
- \param _length The length (weight or cost) of the edges.
+ \param _length The length (cost) of the edges.
\param _cap The capacity of the edges.
\param _s Source node.
\param _t Target node.
@@ -203,9 +203,9 @@
return i;
}
- /// Total weight of the found flow.
+ /// Total cost of the found flow.
- /// This function gives back the total weight of the found flow.
+ /// This function gives back the total cost of the found flow.
Length totalLength(){
return total_length;
}
Modified: hugo/trunk/lemon/suurballe.h
==============================================================================
--- hugo/trunk/lemon/suurballe.h (original)
+++ hugo/trunk/lemon/suurballe.h Fri Jul 1 12:33:27 2005
@@ -39,7 +39,7 @@
/// from a given source node to a given target node in an
/// edge-weighted directed graph having minimal total weight (length).
///
- ///\warning Length values should be nonnegative.
+ ///\warning Length values should be nonnegative!
///
///\param Graph The directed graph type the algorithm runs on.
///\param LengthMap The type of the length map (values should be nonnegative).
@@ -121,7 +121,6 @@
reversed[e] = min_cost_flow.getFlow()[e];
paths.clear();
- //total_length=0;
paths.resize(k);
for (int j=0; j<i; ++j){
Node n=s;
@@ -135,7 +134,6 @@
}
n = G.target(e);
paths[j].push_back(e);
- //total_length += length[e];
reversed[e] = 1-reversed[e];
}
@@ -166,7 +164,7 @@
///This function checks, whether the given solution is optimal.
///Currently this function only checks optimality,
- ///doesn't bother with feasibility
+ ///doesn't bother with feasibility.
///It is meant for testing purposes.
bool checkComplementarySlackness(){
return min_cost_flow.checkComplementarySlackness();
@@ -175,15 +173,15 @@
///Read the found paths.
///This function gives back the \c j-th path in argument p.
- ///Assumes that \c run() has been run and nothing changed since then.
+ ///Assumes that \c run() has been run and nothing has changed since then.
/// \warning It is assumed that \c p is constructed to
///be a path of graph \c G.
///If \c j is not less than the result of previous \c run,
///then the result here will be an empty path (\c j can be 0 as well).
///
///\param Path The type of the path structure to put the result to (must meet lemon path concept).
- ///\param p The path to put the result to
- ///\param j Which path you want to get from the found paths (in a real application you would get the found paths iteratively)
+ ///\param p The path to put the result to.
+ ///\param j Which path you want to get from the found paths (in a real application you would get the found paths iteratively).
template<typename Path>
void getPath(Path& p, size_t j){
More information about the Lemon-commits
mailing list