# HG changeset patch # User athos # Date 1120214007 0 # Node ID 7ceab500e1f65070ac72134668124a054a31fa08 # Parent 8c14aa8f27a210ec9f6fe45dac6bae977d778280 Doc review+corrections in my own documentation according to the reviewers comments. diff -r 8c14aa8f27a2 -r 7ceab500e1f6 doc/graph_io.dox --- a/doc/graph_io.dox Thu Jun 30 16:13:30 2005 +0000 +++ b/doc/graph_io.dox Fri Jul 01 10:33:27 2005 +0000 @@ -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 */ diff -r 8c14aa8f27a2 -r 7ceab500e1f6 lemon/concept/sym_graph.h --- a/lemon/concept/sym_graph.h Thu Jun 30 16:13:30 2005 +0000 +++ b/lemon/concept/sym_graph.h Fri Jul 01 10:33:27 2005 +0000 @@ -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: diff -r 8c14aa8f27a2 -r 7ceab500e1f6 lemon/min_cost_flow.h --- a/lemon/min_cost_flow.h Thu Jun 30 16:13:30 2005 +0000 +++ b/lemon/min_cost_flow.h Fri Jul 01 10:33:27 2005 +0000 @@ -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; } diff -r 8c14aa8f27a2 -r 7ceab500e1f6 lemon/suurballe.h --- a/lemon/suurballe.h Thu Jun 30 16:13:30 2005 +0000 +++ b/lemon/suurballe.h Fri Jul 01 10:33:27 2005 +0000 @@ -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 void getPath(Path& p, size_t j){