Documented Balazs's stuff. Quite enough of that.
1.1 --- a/demo/sample.lgf Mon Jul 04 17:51:07 2005 +0000
1.2 +++ b/demo/sample.lgf Tue Jul 05 14:36:10 2005 +0000
1.3 @@ -15,6 +15,7 @@
1.4 1 3 2 5
1.5 0 2 1 10
1.6 0 1 0 10
1.7 +#This is a comment here
1.8 @nodes
1.9 source 0
1.10 target 5
2.1 --- a/doc/graph_io.dox Mon Jul 04 17:51:07 2005 +0000
2.2 +++ b/doc/graph_io.dox Tue Jul 05 14:36:10 2005 +0000
2.3 @@ -4,8 +4,10 @@
2.4
2.5 \page graph-io-page Graph Input-Output
2.6
2.7 -The standard graph IO enables to store graphs and additional maps
2.8 -in a flexible and efficient way.
2.9 +The standard graph IO enables one to store graphs and additional maps
2.10 +(i.e. functions on the nodes or edges) in a flexible and efficient way.
2.11 +Before you read this page you should be familiar with LEMON
2.12 +\ref graphs "graphs" and \ref maps-page "maps".
2.13
2.14 \section format The general file format
2.15
2.16 @@ -17,14 +19,21 @@
2.17 \li edges
2.18 \li attributes
2.19
2.20 -The nodeset section starts with the following line:
2.21 +Some of these sections can be omitted, but you will basicly need the nodeset
2.22 +section (unless your graph has no nodes at all) and the edgeset section
2.23 +(unless your graph has no edges at all).
2.24 +
2.25 +The nodeset section describes the nodes of your graph: it identifies the nodes
2.26 +and gives the maps defined on them, if any. It starts with the
2.27 +following line:
2.28
2.29 <tt>\@nodeset</tt>
2.30
2.31 The next line contains the names of the nodemaps, separated by whitespaces. Each
2.32 following line describes a node in the graph: it contains the values of the
2.33 maps in the right order. The map named "id" should contain unique values
2.34 -because it is regarded as an ID-map. For example:
2.35 +because it is regarded as an ID-map. These ids need not be numbers but they
2.36 +must identify the nodes uniquely for later reference. For example:
2.37
2.38 \code
2.39 @nodeset
2.40 @@ -39,10 +48,12 @@
2.41
2.42 <tt>\@edgeset</tt>
2.43
2.44 -The next line contains the whitespace separated list of names of the maps.
2.45 -Each of the next lines describes one edge. The first two elements in the line
2.46 -are the IDs of the source and target (or tail and head) node of the edge as they occur in the ID node
2.47 -map. You can also have an optional ID map on the edges for later reference.
2.48 +The next line contains the whitespace separated list of names of the edge
2.49 +maps. Each of the next lines describes one edge. The first two elements in
2.50 +the line are the IDs of the source and target (or tail and head) nodes of the
2.51 +edge as they occur in the ID node map of the nodeset section. You can also
2.52 +have an optional ID map on the edges for later reference (which has to be
2.53 +unique in this case).
2.54
2.55 \code
2.56 @edgeset
2.57 @@ -52,13 +63,14 @@
2.58 3 12 g 3.4 g-edge
2.59 \endcode
2.60
2.61 -The next section contains <em>labeled nodes</em> (i.e. nodes having a special
2.62 +The \e nodes section contains <em>labeled (distinguished) nodes</em>
2.63 +(i.e. nodes having a special
2.64 label on them). The section starts with
2.65
2.66 <tt> \@nodes </tt>
2.67
2.68 Each of the next lines contains a label for a node in the graph
2.69 -and then the ID described in the nodeset section.
2.70 +and then the ID as described in the \e nodeset section.
2.71
2.72 \code
2.73 @nodes
2.74 @@ -66,12 +78,12 @@
2.75 target 12
2.76 \endcode
2.77
2.78 -The last section describes the <em>labeled edges</em>
2.79 +The last section describes the <em>labeled (distinguished) edges</em>
2.80 (i.e. edges having a special label on them). It starts with \c \@edges
2.81 and then each line contains the name of the edge and the ID.
2.82
2.83 \code
2.84 -@nodes
2.85 +@edges
2.86 observed c
2.87 \endcode
2.88
2.89 @@ -80,8 +92,8 @@
2.90 start with an \c # character.
2.91
2.92 The attributes section can handle some information about the graph. It
2.93 -contains in each line an key and the mapped value to key. The key should
2.94 -be a string without whitespace, the value can be from various type.
2.95 +contains key-value pairs in each line (a key and the mapped value to key). The
2.96 +key should be a string without whitespaces, the value can be of various types.
2.97
2.98 \code
2.99 @attributes
2.100 @@ -91,27 +103,28 @@
2.101 version 12
2.102 \endcode
2.103
2.104 -\code
2.105 -@end
2.106 -\endcode
2.107 -=======
2.108 -The file ends with the
2.109 -
2.110 <tt> \@end </tt>
2.111
2.112 line.
2.113
2.114
2.115 \section use Using graph input-output
2.116 -The graph input and output is based on reading and writing commands. The user
2.117 -adds reading and writing commands to the reader or writer class, then he
2.118 -calls the \c run() method that executes all the given commands.
2.119 +
2.120 +The easiest way of using graph input and output is using the versions of the
2.121 + public \ref readGraph() and \ref writeGraph() functions; if you don't need
2.122 + very sophisticated behaviour then you might be satisfied with
2.123 + those. Otherwise go on reading this page.
2.124 +
2.125 +The graph input and output is based on <em> reading and writing
2.126 +commands</em>. The user gives reading and writing commands to the reader or
2.127 +writer class, then he calls the \c run() method that executes all the given
2.128 +commands.
2.129
2.130 \subsection write Writing a graph
2.131
2.132 The \c GraphWriter class provides the graph output. To write a graph
2.133 you should first give writing commands to the writer. You can declare
2.134 -write command as \c NodeMap or \c EdgeMap writing and labeled Node and
2.135 +writing command as \c NodeMap or \c EdgeMap writing and labeled Node and
2.136 Edge writing.
2.137
2.138 \code
2.139 @@ -119,9 +132,9 @@
2.140 \endcode
2.141
2.142 The \c writeNodeMap() function declares a \c NodeMap writing command in the
2.143 -\c GraphWriter. You should give a name of the map and the map
2.144 +\c GraphWriter. You should give a name to the map and the map
2.145 object as parameters. The NodeMap writing command with name "id" should write a
2.146 -unique map because it is regarded as ID map.
2.147 +unique map because it will be regarded as an ID map.
2.148
2.149 \see IdMap, DescriptorMap
2.150
2.151 @@ -174,7 +187,7 @@
2.152
2.153 \subsection reading Reading a graph
2.154
2.155 -The given file format may contain several maps and labeled nodes or edges.
2.156 +The file to be read may contain several maps and labeled nodes or edges.
2.157 If you read a graph you need not read all the maps and items just those
2.158 that you need. The interface of the \c GraphReader is very similar to
2.159 the GraphWriter but the reading method does not depend on the order of the
2.160 @@ -188,7 +201,7 @@
2.161 GraphReader<ListGraph> reader(std::cin, graph);
2.162 \endcode
2.163
2.164 -The \c readNodeMap() function reads a map from the \c \@nodeset section.
2.165 +The \c readNodeMap() function reads a map from the \c nodeset section.
2.166 If there is a map that you do not want to read from the file and there are
2.167 whitespaces in the string represenation of the values then you should
2.168 call the \c skipNodeMap() template member function with proper parameters.
2.169 @@ -239,14 +252,17 @@
2.170 reader.run();
2.171 \endcode
2.172
2.173 +\anchor rwbackground
2.174 \section types Background of Reading and Writing
2.175 +
2.176 +
2.177 To read a map (on the nodes or edges)
2.178 the \c GraphReader should know how to read a Value from the given map.
2.179 By the default implementation the input operator reads a value from
2.180 the stream and the type of the readed value is the value type of the given map.
2.181 When the reader should skip a value in the stream, because you do not
2.182 want to store it in a map, the reader skips a character sequence without
2.183 -whitespace.
2.184 +whitespaces.
2.185
2.186 If you want to change the functionality of the reader, you can use
2.187 template parameters to specialize it. When you give a reading
2.188 @@ -264,7 +280,7 @@
2.189 \endcode
2.190
2.191 For example, the \c "strings" nodemap contains strings and you do not need
2.192 -the value of the string just the length. Then you can implement own Reader
2.193 +the value of the string just the length. Then you can implement an own Reader
2.194 struct.
2.195
2.196 \code
2.197 @@ -284,21 +300,22 @@
2.198 The global functionality of the reader class can be changed by giving a
2.199 special template parameter to the GraphReader class. By default, the
2.200 template parameter is \c DefaultReaderTraits. A reader traits class
2.201 -should provide an inner template class Reader for each type, and an
2.202 +should provide an inner template class Reader for each type, and a
2.203 DefaultReader for skipping a value.
2.204
2.205 -The specialization of writing should be very similar to that of reading.
2.206 +The specialization of writing is very similar to that of reading.
2.207
2.208 -\section undir Undir graphs
2.209 +\section undir Undirected graphs
2.210
2.211 -In the undir graph format there is an \c undiredgeset section instead of
2.212 -the \c edgeset section. The first line of the section describes the
2.213 -undirected egdes' names and all next lines describes one undirected edge
2.214 -with the the incident nodes and the values of the map.
2.215 +In a file describing an undirected graph (undir graph, for short) you find an
2.216 +\c undiredgeset section instead of the \c edgeset section. The first line of
2.217 +the section describes the names of the maps on the undirected egdes and all
2.218 +next lines describe one undirected edge with the the incident nodes and the
2.219 +values of the map.
2.220
2.221 -The format handles the directed edge maps as a syntactical sugar, if there
2.222 -is two map which names are the same with a \c '+' and a \c '-' prefix
2.223 -then it can be read as an directed map.
2.224 +The format handles directed edge maps as a syntactical sugar???, if there
2.225 +are two maps with names being the same with a \c '+' and a \c '-' prefix
2.226 +then this will be read as a directed map.
2.227
2.228 \code
2.229 @undiredgeset
2.230 @@ -308,9 +325,9 @@
2.231 21 12 8 3.4 0.0 0.0
2.232 \endcode
2.233
2.234 -The \c edges section changed to \c undiredges section. This section
2.235 +The \c edges section is changed to \c undiredges section. This section
2.236 describes labeled edges and undirected edges. The directed edge label
2.237 -should start with a \c '+' and a \c '-' prefix what decide the direction
2.238 +should start with a \c '+' or a \c '-' prefix to decide the direction
2.239 of the edge.
2.240
2.241 \code
2.242 @@ -337,12 +354,13 @@
2.243
2.244 \section advanced Advanced features
2.245
2.246 -The graph reader and writer classes gives an easy way to read and write
2.247 -graphs. But sometimes we want more advanced features. This way we can
2.248 -use the more general lemon reader and writer interface.
2.249 +The graph reader and writer classes give an easy way to read and write
2.250 +graphs. But sometimes we want more advanced features. In this case we can
2.251 +use the more general <tt>lemon reader and writer</tt> interface.
2.252
2.253 -The lemon format is an section oriented file format. It contains one or
2.254 -more section, each starts with a line with \c \@ first character.
2.255 +The LEMON file format is a section oriented file format. It contains one or
2.256 +more sections, each starting with a line identifying its type
2.257 +(the word starting with the \c \@ character).
2.258 The content of the section this way cannot contain line with \c \@ first
2.259 character. The file may contains comment lines with \c # first character.
2.260
2.261 @@ -351,7 +369,7 @@
2.262 classes which can be attached to a \c LemonReader or a \c LemonWriter.
2.263
2.264 There are default section readers and writers for reading and writing
2.265 -item sets, and labeled items in the graph. These reads and writes
2.266 +item sets, and labeled items in the graph. These read and write
2.267 the format described above. Other type of data can be handled with own
2.268 section reader and writer classes which are inherited from the
2.269 \c LemonReader::SectionReader or the \c LemonWriter::SectionWriter classes.
2.270 @@ -392,11 +410,11 @@
2.271
2.272 The other advanced stuff of the generalized file format is that
2.273 multiple edgesets can be stored to the same nodeset. It can be used
2.274 -by example as a network traffic matrix.
2.275 +for example as a network traffic matrix.
2.276
2.277 -In example there is a network with symmetric links and there are assymetric
2.278 +In our example there is a network with symmetric links and there are assymetric
2.279 traffic request on the network. This construction can be stored in an
2.280 -undirected graph and in an directed NewEdgeSetAdaptor class. The example
2.281 +undirected graph and in a directed NewEdgeSetAdaptor class. The example
2.282 shows the input with the LemonReader class:
2.283
2.284 \code
2.285 @@ -417,7 +435,7 @@
2.286
2.287 Because the GraphReader and the UndirGraphReader can be converted
2.288 to LemonReader and it can resolve the ID's of the items, the previous
2.289 -result can be achived with the UndirGraphReader class also.
2.290 +result can be achived with the UndirGraphReader class, too.
2.291
2.292
2.293 \code
3.1 --- a/lemon/dfs.h Mon Jul 04 17:51:07 2005 +0000
3.2 +++ b/lemon/dfs.h Tue Jul 05 14:36:10 2005 +0000
3.3 @@ -644,7 +644,7 @@
3.4 ///
3.5 ///\return The length of the %DFS s---t path if there exists one,
3.6 ///0 otherwise.
3.7 - ///\note Apart from the return value, d.run(s) is
3.8 + ///\note Apart from the return value, d.run(s,t) is
3.9 ///just a shortcut of the following code.
3.10 ///\code
3.11 /// d.init();
4.1 --- a/lemon/graph_reader.h Mon Jul 04 17:51:07 2005 +0000
4.2 +++ b/lemon/graph_reader.h Tue Jul 05 14:36:10 2005 +0000
4.3 @@ -36,19 +36,21 @@
4.4 /// The \c GraphReader class provides the graph input.
4.5 /// Before you read this documentation it might be useful to read the general
4.6 /// description of \ref graph-io-page "Graph Input-Output".
4.7 + ///
4.8 /// If you don't need very sophisticated
4.9 /// behaviour then you can use the versions of the public function
4.10 /// \ref readGraph() to read a graph (or a max flow instance etc).
4.11 ///
4.12 - /// The given file format may contain several maps and labeled nodes or
4.13 + /// The file to be read may contain several maps and labeled nodes or
4.14 /// edges.
4.15 ///
4.16 /// If you read a graph you need not read all the maps and items just those
4.17 /// that you need. The interface of the \c GraphReader is very similar to
4.18 /// the GraphWriter but the reading method does not depend on the order the
4.19 - /// given commands.
4.20 + /// given commands (i.e. you don't have to insist on the order in which the
4.21 + /// maps are given in the file).
4.22 ///
4.23 - /// The reader object suppose that each not readed value does not contain
4.24 + /// The reader object assumes that not readed values do not contain
4.25 /// whitespaces, therefore it has some extra possibilities to control how
4.26 /// it should skip the values when the string representation contains spaces.
4.27 ///
4.28 @@ -90,11 +92,11 @@
4.29 /// \endcode
4.30 ///
4.31 /// With the \c readAttribute() functions you can read an attribute
4.32 - /// in a variable. You can specify the reader for the attribute as
4.33 + /// into a variable. You can specify the reader for the attribute as
4.34 /// the nodemaps.
4.35 ///
4.36 /// After you give all read commands you must call the \c run() member
4.37 - /// function, which execute all the commands.
4.38 + /// function, which executes all the commands.
4.39 ///
4.40 /// \code
4.41 /// reader.run();
4.42 @@ -119,7 +121,7 @@
4.43 /// \brief Construct a new GraphReader.
4.44 ///
4.45 /// Construct a new GraphReader. It reads into the given graph
4.46 - /// and it use the given reader as the default skipper.
4.47 + /// and it uses the given reader as the default skipper.
4.48 GraphReader(std::istream& _is,
4.49 typename SmartParameter<Graph>::Type _graph,
4.50 const DefaultSkipper& _skipper = DefaultSkipper())
4.51 @@ -134,7 +136,7 @@
4.52 /// \brief Construct a new GraphReader.
4.53 ///
4.54 /// Construct a new GraphReader. It reads into the given graph
4.55 - /// and it use the given reader as the default skipper.
4.56 + /// and it uses the given reader as the default skipper.
4.57 GraphReader(const std::string& _filename,
4.58 typename SmartParameter<Graph>::Type _graph,
4.59 const DefaultSkipper& _skipper = DefaultSkipper())
4.60 @@ -150,7 +152,7 @@
4.61 /// \brief Construct a new GraphReader.
4.62 ///
4.63 /// Construct a new GraphReader. It reads into the given graph
4.64 - /// and it use the given reader as the default skipper.
4.65 + /// and it uses the given reader as the default skipper.
4.66 GraphReader(LemonReader& _reader,
4.67 typename SmartParameter<Graph>::Type _graph,
4.68 const DefaultSkipper& _skipper = DefaultSkipper())
4.69 @@ -170,9 +172,9 @@
4.70 delete reader;
4.71 }
4.72
4.73 - /// \brief Add a new node map reader command for the reader.
4.74 + /// \brief Give a new node map reading command to the reader.
4.75 ///
4.76 - /// Add a new node map reader command for the reader.
4.77 + /// Give a new node map reading command to the reader.
4.78 template <typename Map>
4.79 GraphReader& readNodeMap(std::string name, Map& map) {
4.80 nodeset_reader.readNodeMap(name, map);
4.81 @@ -185,9 +187,9 @@
4.82 return *this;
4.83 }
4.84
4.85 - /// \brief Add a new node map reader command for the reader.
4.86 + /// \brief Give a new node map reading command to the reader.
4.87 ///
4.88 - /// Add a new node map reader command for the reader.
4.89 + /// Give a new node map reading command to the reader.
4.90 template <typename Reader, typename Map>
4.91 GraphReader& readNodeMap(std::string name, Map& map,
4.92 const Reader& reader = Reader()) {
4.93 @@ -202,9 +204,9 @@
4.94 return *this;
4.95 }
4.96
4.97 - /// \brief Add a new node map skipper command for the reader.
4.98 + /// \brief Give a new node map skipping command to the reader.
4.99 ///
4.100 - /// Add a new node map skipper command for the reader.
4.101 + /// Give a new node map skipping command to the reader.
4.102 template <typename Reader>
4.103 GraphReader& skipNodeMap(std::string name,
4.104 const Reader& reader = Reader()) {
4.105 @@ -212,9 +214,9 @@
4.106 return *this;
4.107 }
4.108
4.109 - /// \brief Add a new edge map reader command for the reader.
4.110 + /// \brief Give a new edge map reading command to the reader.
4.111 ///
4.112 - /// Add a new edge map reader command for the reader.
4.113 + /// Give a new edge map reading command to the reader.
4.114 template <typename Map>
4.115 GraphReader& readEdgeMap(std::string name, Map& map) {
4.116 edgeset_reader.readEdgeMap(name, map);
4.117 @@ -228,9 +230,9 @@
4.118 }
4.119
4.120
4.121 - /// \brief Add a new edge map reader command for the reader.
4.122 + /// \brief Give a new edge map reading command to the reader.
4.123 ///
4.124 - /// Add a new edge map reader command for the reader.
4.125 + /// Give a new edge map reading command to the reader.
4.126 template <typename Reader, typename Map>
4.127 GraphReader& readEdgeMap(std::string name, Map& map,
4.128 const Reader& reader = Reader()) {
4.129 @@ -245,9 +247,9 @@
4.130 return *this;
4.131 }
4.132
4.133 - /// \brief Add a new edge map skipper command for the reader.
4.134 + /// \brief Give a new edge map skipping command to the reader.
4.135 ///
4.136 - /// Add a new edge map skipper command for the reader.
4.137 + /// Give a new edge map skipping command to the reader.
4.138 template <typename Reader>
4.139 GraphReader& skipEdgeMap(std::string name,
4.140 const Reader& reader = Reader()) {
4.141 @@ -255,34 +257,34 @@
4.142 return *this;
4.143 }
4.144
4.145 - /// \brief Add a new labeled node reader for the reader.
4.146 + /// \brief Give a new labeled node reading command to the reader.
4.147 ///
4.148 - /// Add a new labeled node reader for the reader.
4.149 + /// Give a new labeled node reading command to the reader.
4.150 GraphReader& readNode(std::string name, Node& node) {
4.151 node_reader.readNode(name, node);
4.152 return *this;
4.153 }
4.154
4.155 - /// \brief Add a new labeled edge reader for the reader.
4.156 + /// \brief Give a new labeled edge reading command to the reader.
4.157 ///
4.158 - /// Add a new labeled edge reader for the reader.
4.159 + /// Give a new labeled edge reading command to the reader.
4.160 GraphReader& readEdge(std::string name, Edge& edge) {
4.161 edge_reader.readEdge(name, edge);
4.162 return *this;
4.163 }
4.164
4.165 - /// \brief Add a new attribute reader command.
4.166 + /// \brief Give a new attribute reading command.
4.167 ///
4.168 - /// Add a new attribute reader command.
4.169 + /// Give a new attribute reading command.
4.170 template <typename Value>
4.171 GraphReader& readAttribute(std::string name, Value& value) {
4.172 attribute_reader.readAttribute(name, value);
4.173 return *this;
4.174 }
4.175
4.176 - /// \brief Add a new attribute reader command.
4.177 + /// \brief Give a new attribute reading command.
4.178 ///
4.179 - /// Add a new attribute reader command.
4.180 + /// Give a new attribute reading command.
4.181 template <typename Reader, typename Value>
4.182 GraphReader& readAttribute(std::string name, Value& value,
4.183 const Reader& reader) {
4.184 @@ -292,17 +294,17 @@
4.185
4.186 /// \brief Conversion operator to LemonReader.
4.187 ///
4.188 - /// Conversion operator to LemonReader. It make possible
4.189 - /// to access the encapsulated \e LemonReader, this way
4.190 - /// you can attach to this reader new instances of
4.191 - /// \e LemonReader::SectionReader.
4.192 + /// Conversion operator to LemonReader. It makes possible to access the
4.193 + /// encapsulated \e LemonReader, this way you can attach to this reader
4.194 + /// new instances of \e LemonReader::SectionReader. For more details see
4.195 + /// the \ref rwbackground "Background of Reading and Writing".
4.196 operator LemonReader&() {
4.197 return *reader;
4.198 }
4.199
4.200 - /// \brief Executes the reader commands.
4.201 + /// \brief Executes the reading commands.
4.202 ///
4.203 - /// Executes the reader commands.
4.204 + /// Executes the reading commands.
4.205 void run() {
4.206 reader->run();
4.207 }
4.208 @@ -432,13 +434,21 @@
4.209
4.210 /// \brief The undir graph reader class.
4.211 ///
4.212 + /// The \c UndirGraphReader class provides the graph input.
4.213 + /// Before you read this documentation it might be useful to read the general
4.214 + /// description of \ref graph-io-page "Graph Input-Output".
4.215 + ///
4.216 + /// If you don't need very sophisticated
4.217 + /// behaviour then you can use the versions of the public function
4.218 + /// \ref readGraph() to read a graph (or a max flow instance etc).
4.219 + ///
4.220 /// The given file format may contain several maps and labeled nodes or
4.221 /// edges.
4.222 ///
4.223 /// If you read a graph you need not read all the maps and items just those
4.224 - /// that you need. The interface of the \c GraphReader is very similar to
4.225 - /// the GraphWriter but the reading method does not depend on the order the
4.226 - /// given commands.
4.227 + /// that you need. The interface of the \c UndirGraphReader is very similar
4.228 + /// to the UndirGraphWriter but the reading method does not depend on the
4.229 + /// order of the given commands.
4.230 ///
4.231 /// The reader object suppose that each not readed value does not contain
4.232 /// whitespaces, therefore it has some extra possibilities to control how
4.233 @@ -569,9 +579,9 @@
4.234 delete reader;
4.235 }
4.236
4.237 - /// \brief Add a new node map reader command for the reader.
4.238 + /// \brief Give a new node map reading command to the reader.
4.239 ///
4.240 - /// Add a new node map reader command for the reader.
4.241 + /// Give a new node map reading command to the reader.
4.242 template <typename Map>
4.243 UndirGraphReader& readNodeMap(std::string name, Map& map) {
4.244 nodeset_reader.readNodeMap(name, map);
4.245 @@ -584,9 +594,9 @@
4.246 return *this;
4.247 }
4.248
4.249 - /// \brief Add a new node map reader command for the reader.
4.250 + /// \brief Give a new node map reading command to the reader.
4.251 ///
4.252 - /// Add a new node map reader command for the reader.
4.253 + /// Give a new node map reading command to the reader.
4.254 template <typename Reader, typename Map>
4.255 UndirGraphReader& readNodeMap(std::string name, Map& map,
4.256 const Reader& reader = Reader()) {
4.257 @@ -601,9 +611,9 @@
4.258 return *this;
4.259 }
4.260
4.261 - /// \brief Add a new node map skipper command for the reader.
4.262 + /// \brief Give a new node map skipping command to the reader.
4.263 ///
4.264 - /// Add a new node map skipper command for the reader.
4.265 + /// Give a new node map skipping command to the reader.
4.266 template <typename Reader>
4.267 UndirGraphReader& skipNodeMap(std::string name,
4.268 const Reader& reader = Reader()) {
4.269 @@ -611,9 +621,9 @@
4.270 return *this;
4.271 }
4.272
4.273 - /// \brief Add a new undirected edge map reader command for the reader.
4.274 + /// \brief Give a new undirected edge map reading command to the reader.
4.275 ///
4.276 - /// Add a new undirected edge map reader command for the reader.
4.277 + /// Give a new undirected edge map reading command to the reader.
4.278 template <typename Map>
4.279 UndirGraphReader& readUndirEdgeMap(std::string name, Map& map) {
4.280 undir_edgeset_reader.readUndirEdgeMap(name, map);
4.281 @@ -627,9 +637,9 @@
4.282 }
4.283
4.284
4.285 - /// \brief Add a new undirected edge map reader command for the reader.
4.286 + /// \brief Give a new undirected edge map reading command to the reader.
4.287 ///
4.288 - /// Add a new undirected edge map reader command for the reader.
4.289 + /// Give a new undirected edge map reading command to the reader.
4.290 template <typename Reader, typename Map>
4.291 UndirGraphReader& readUndirEdgeMap(std::string name, Map& map,
4.292 const Reader& reader = Reader()) {
4.293 @@ -644,9 +654,9 @@
4.294 return *this;
4.295 }
4.296
4.297 - /// \brief Add a new undirected edge map skipper command for the reader.
4.298 + /// \brief Give a new undirected edge map skipping command to the reader.
4.299 ///
4.300 - /// Add a new undirected edge map skipper command for the reader.
4.301 + /// Give a new undirected edge map skipping command to the reader.
4.302 template <typename Reader>
4.303 UndirGraphReader& skipUndirEdgeMap(std::string name,
4.304 const Reader& reader = Reader()) {
4.305 @@ -655,9 +665,9 @@
4.306 }
4.307
4.308
4.309 - /// \brief Add a new edge map reader command for the reader.
4.310 + /// \brief Give a new edge map reading command to the reader.
4.311 ///
4.312 - /// Add a new edge map reader command for the reader.
4.313 + /// Give a new edge map reading command to the reader.
4.314 template <typename Map>
4.315 UndirGraphReader& readEdgeMap(std::string name, Map& map) {
4.316 undir_edgeset_reader.readEdgeMap(name, map);
4.317 @@ -671,9 +681,9 @@
4.318 }
4.319
4.320
4.321 - /// \brief Add a new edge map reader command for the reader.
4.322 + /// \brief Give a new edge map reading command to the reader.
4.323 ///
4.324 - /// Add a new edge map reader command for the reader.
4.325 + /// Give a new edge map reading command to the reader.
4.326 template <typename Reader, typename Map>
4.327 UndirGraphReader& readEdgeMap(std::string name, Map& map,
4.328 const Reader& reader = Reader()) {
4.329 @@ -688,9 +698,9 @@
4.330 return *this;
4.331 }
4.332
4.333 - /// \brief Add a new edge map skipper command for the reader.
4.334 + /// \brief Give a new edge map skipping command to the reader.
4.335 ///
4.336 - /// Add a new edge map skipper command for the reader.
4.337 + /// Give a new edge map skipping command to the reader.
4.338 template <typename Reader>
4.339 UndirGraphReader& skipEdgeMap(std::string name,
4.340 const Reader& reader = Reader()) {
4.341 @@ -698,40 +708,41 @@
4.342 return *this;
4.343 }
4.344
4.345 - /// \brief Add a new labeled node reader for the reader.
4.346 + /// \brief Give a new labeled node reading command to the reader.
4.347 ///
4.348 - /// Add a new labeled node reader for the reader.
4.349 + /// Give a new labeled node reading command to the reader.
4.350 UndirGraphReader& readNode(std::string name, Node& node) {
4.351 node_reader.readNode(name, node);
4.352 return *this;
4.353 }
4.354
4.355 - /// \brief Add a new labeled edge reader for the reader.
4.356 + /// \brief Give a new labeled edge reading command to the reader.
4.357 ///
4.358 - /// Add a new labeled edge reader for the reader.
4.359 + /// Give a new labeled edge reading command to the reader.
4.360 UndirGraphReader& readEdge(std::string name, Edge& edge) {
4.361 undir_edge_reader.readEdge(name, edge);
4.362 }
4.363
4.364 - /// \brief Add a new labeled undirected edge reader for the reader.
4.365 + /// \brief Give a new labeled undirected edge reading command to the
4.366 + /// reader.
4.367 ///
4.368 - /// Add a new labeled undirected edge reader for the reader.
4.369 + /// Give a new labeled undirected edge reading command to the reader.
4.370 UndirGraphReader& readUndirEdge(std::string name, UndirEdge& edge) {
4.371 undir_edge_reader.readUndirEdge(name, edge);
4.372 }
4.373
4.374 - /// \brief Add a new attribute reader command.
4.375 + /// \brief Give a new attribute reading command.
4.376 ///
4.377 - /// Add a new attribute reader command.
4.378 + /// Give a new attribute reading command.
4.379 template <typename Value>
4.380 UndirGraphReader& readAttribute(std::string name, Value& value) {
4.381 attribute_reader.readAttribute(name, value);
4.382 return *this;
4.383 }
4.384
4.385 - /// \brief Add a new attribute reader command.
4.386 + /// \brief Give a new attribute reading command.
4.387 ///
4.388 - /// Add a new attribute reader command.
4.389 + /// Give a new attribute reading command.
4.390 template <typename Reader, typename Value>
4.391 UndirGraphReader& readAttribute(std::string name, Value& value,
4.392 const Reader& reader) {
4.393 @@ -749,9 +760,9 @@
4.394 return *reader;
4.395 }
4.396
4.397 - /// \brief Executes the reader commands.
4.398 + /// \brief Executes the reading commands.
4.399 ///
4.400 - /// Executes the reader commands.
4.401 + /// Executes the reading commands.
4.402 void run() {
4.403 reader->run();
4.404 }
5.1 --- a/lemon/graph_utils.h Mon Jul 04 17:51:07 2005 +0000
5.2 +++ b/lemon/graph_utils.h Tue Jul 05 14:36:10 2005 +0000
5.3 @@ -30,8 +30,6 @@
5.4 ///\file
5.5 ///\brief Graph utilities.
5.6 ///
5.7 -///\todo Please
5.8 -///revise the documentation.
5.9 ///
5.10
5.11
5.12 @@ -42,7 +40,7 @@
5.13
5.14 /// \brief Function to count the items in the graph.
5.15 ///
5.16 - /// This function counts the items in the graph.
5.17 + /// This function counts the items (nodes, edges etc) in the graph.
5.18 /// The complexity of the function is O(n) because
5.19 /// it iterates on all of the items.
5.20
5.21 @@ -125,7 +123,7 @@
5.22 ///
5.23 /// This function counts the undirected edges in the graph.
5.24 /// The complexity of the function is O(e) but for some
5.25 - /// graph structure it is specialized to run in O(1).
5.26 + /// graph structures it is specialized to run in O(1).
5.27
5.28 template <typename Graph>
5.29 inline int countUndirEdges(const Graph& g) {
5.30 @@ -193,11 +191,11 @@
5.31 return e;
5.32 }
5.33
5.34 - /// \brief Copy the source map to the target map.
5.35 + /// \brief Copy a map.
5.36 ///
5.37 - /// Copy the \c source map to the \c target map. It uses the given iterator
5.38 - /// to iterate on the data structure and it use the \c ref mapping to
5.39 - /// convert the source's keys to the target's keys.
5.40 + /// Thsi function copies the \c source map to the \c target map. It uses the
5.41 + /// given iterator to iterate on the data structure and it uses the \c ref
5.42 + /// mapping to convert the source's keys to the target's keys.
5.43 template <typename Target, typename Source,
5.44 typename ItemIt, typename Ref>
5.45 void copyMap(Target& target, const Source& source,
5.46 @@ -220,10 +218,10 @@
5.47 }
5.48
5.49
5.50 - /// \brief Class to copy a graph to an other graph.
5.51 + /// \brief Class to copy a graph.
5.52 ///
5.53 - /// Class to copy a graph to an other graph. It can be used easier
5.54 - /// with the \c copyGraph() function.
5.55 + /// Class to copy a graph to an other graph (duplicate a graph). The
5.56 + /// simplest way of using it is through the \c copyGraph() function.
5.57 template <typename Target, typename Source>
5.58 class GraphCopy {
5.59 public:
5.60 @@ -354,7 +352,7 @@
5.61 ///
5.62 /// After the copy the \c nr map will contain the mapping from the
5.63 /// source graph's nodes to the target graph's nodes and the \c ecr will
5.64 - /// contain the mapping from the target graph's edge to the source's
5.65 + /// contain the mapping from the target graph's edges to the source's
5.66 /// edges.
5.67 template <typename Target, typename Source>
5.68 GraphCopy<Target, Source> copyGraph(Target& target, const Source& source) {
5.69 @@ -458,8 +456,13 @@
5.70
5.71 /// Provides an immutable and unique id for each item in the graph.
5.72
5.73 - /// The IdMap class provides a unique and immutable mapping for each item
5.74 - /// in the graph.
5.75 + /// The IdMap class provides a unique and immutable id for each item of the
5.76 + /// same type (e.g. node) in the graph. This id is <ul><li>\b unique:
5.77 + /// different items (nodes) get different ids <li>\b immutable: the id of an
5.78 + /// item (node) does not change (even if you delete other nodes). </ul>
5.79 + /// Through this map you get access (i.e. can read) the inner id values of
5.80 + /// the items stored in the graph. This map can be inverted with its member
5.81 + /// class \c InverseMap.
5.82 ///
5.83 template <typename _Graph, typename _Item>
5.84 class IdMap {
5.85 @@ -487,9 +490,9 @@
5.86
5.87 public:
5.88
5.89 - /// \brief The class represents the inverse of the map.
5.90 + /// \brief The class represents the inverse of its owner (IdMap).
5.91 ///
5.92 - /// The class represents the inverse of the map.
5.93 + /// The class represents the inverse of its owner (IdMap).
5.94 /// \see inverse()
5.95 class InverseMap {
5.96 public:
5.97 @@ -517,7 +520,7 @@
5.98
5.99 /// \brief Gives back the inverse of the map.
5.100 ///
5.101 - /// Gives back the inverse of the map.
5.102 + /// Gives back the inverse of the IdMap.
5.103 InverseMap inverse() const { return InverseMap(*graph);}
5.104
5.105 };
5.106 @@ -525,7 +528,7 @@
5.107
5.108 /// \brief General invertable graph-map type.
5.109
5.110 - /// This type provides simple invertable map functions.
5.111 + /// This type provides simple invertable graph-maps.
5.112 /// The InvertableMap wraps an arbitrary ReadWriteMap
5.113 /// and if a key is set to a new value then store it
5.114 /// in the inverse map.
5.115 @@ -658,9 +661,14 @@
5.116 /// \brief Provides a mutable, continuous and unique descriptor for each
5.117 /// item in the graph.
5.118 ///
5.119 - /// The DescriptorMap class provides a mutable, continuous and immutable
5.120 - /// mapping for each item in the graph. The value for an item may mutated
5.121 - /// on each operation when the an item erased or added to graph.
5.122 + /// The DescriptorMap class provides a unique and continuous (but mutable)
5.123 + /// descriptor (id) for each item of the same type (e.g. node) in the
5.124 + /// graph. This id is <ul><li>\b unique: different items (nodes) get
5.125 + /// different ids <li>\b continuous: the range of the ids is the set of
5.126 + /// integers between 0 and \c n-1, where \c n is the number of the items of
5.127 + /// this type (e.g. nodes) (so the id of a node can change if you delete an
5.128 + /// other node, i.e. this id is mutable). </ul> This map can be inverted
5.129 + /// with its member class \c InverseMap.
5.130 ///
5.131 /// \param _Graph The graph class the \c DescriptorMap belongs to.
5.132 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or
5.133 @@ -754,9 +762,9 @@
5.134 Container invMap;
5.135
5.136 public:
5.137 - /// \brief The inverse map type.
5.138 + /// \brief The inverse map type of DescriptorMap.
5.139 ///
5.140 - /// The inverse map type.
5.141 + /// The inverse map type of DescriptorMap.
5.142 class InverseMap {
5.143 public:
5.144 /// \brief Constructor of the InverseMap.
5.145 @@ -873,16 +881,16 @@
5.146
5.147 /// \brief Returns a \ref TargetMap class
5.148 ///
5.149 - /// This function just returns an \ref TargetMap class.
5.150 + /// This function just returns a \ref TargetMap class.
5.151 /// \relates TargetMap
5.152 template <typename Graph>
5.153 inline TargetMap<Graph> targetMap(const Graph& graph) {
5.154 return TargetMap<Graph>(graph);
5.155 }
5.156
5.157 - /// \brief Returns the "forward" directed edge view of undirected edge.
5.158 + /// \brief Returns the "forward" directed edge view of an undirected edge.
5.159 ///
5.160 - /// Returns the "forward" directed edge view of undirected edge.
5.161 + /// Returns the "forward" directed edge view of an undirected edge.
5.162 /// \author Balazs Dezso
5.163 template <typename Graph>
5.164 class ForwardMap {
5.165 @@ -921,9 +929,9 @@
5.166 return ForwardMap<Graph>(graph);
5.167 }
5.168
5.169 - /// \brief Returns the "backward" directed edge view of undirected edge.
5.170 + /// \brief Returns the "backward" directed edge view of an undirected edge.
5.171 ///
5.172 - /// Returns the "backward" directed edge view of undirected edge.
5.173 + /// Returns the "backward" directed edge view of an undirected edge.
5.174 /// \author Balazs Dezso
5.175 template <typename Graph>
5.176 class BackwardMap {
5.177 @@ -954,7 +962,7 @@
5.178
5.179 /// \brief Returns a \ref BackwardMap class
5.180
5.181 - /// This function just returns an \ref BackwardMap class.
5.182 + /// This function just returns a \ref BackwardMap class.
5.183 /// \relates BackwardMap
5.184 template <typename Graph>
5.185 inline BackwardMap<Graph> backwardMap(const Graph& graph) {
5.186 @@ -975,9 +983,9 @@
5.187
5.188 /// \brief Map of the node in-degrees.
5.189 ///
5.190 - /// This map returns the in-degree of a node. Ones it is constructed,
5.191 + /// This map returns the in-degree of a node. Once it is constructed,
5.192 /// the degrees are stored in a standard NodeMap, so each query is done
5.193 - /// in constant time. On the other hand, the values updates automatically
5.194 + /// in constant time. On the other hand, the values are updated automatically
5.195 /// whenever the graph changes.
5.196 ///
5.197 /// \sa OutDegMap
5.198 @@ -1067,9 +1075,9 @@
5.199
5.200 /// \brief Map of the node out-degrees.
5.201 ///
5.202 - /// This map returns the out-degree of a node. One it is constructed,
5.203 + /// This map returns the out-degree of a node. Once it is constructed,
5.204 /// the degrees are stored in a standard NodeMap, so each query is done
5.205 - /// in constant time. On the other hand, the values updates automatically
5.206 + /// in constant time. On the other hand, the values are updated automatically
5.207 /// whenever the graph changes.
5.208 ///
5.209 /// \sa OutDegMap
6.1 --- a/lemon/graph_writer.h Mon Jul 04 17:51:07 2005 +0000
6.2 +++ b/lemon/graph_writer.h Tue Jul 05 14:36:10 2005 +0000
6.3 @@ -37,6 +37,7 @@
6.4 /// The \c GraphWriter class provides the graph output.
6.5 /// Before you read this documentation it might be useful to read the general
6.6 /// description of \ref graph-io-page "Graph Input-Output".
6.7 + ///
6.8 /// If you don't need very sophisticated
6.9 /// behaviour then you can use the versions of the public function
6.10 /// \ref writeGraph() to output a graph (or a max flow instance etc).
6.11 @@ -164,6 +165,7 @@
6.12 return *this;
6.13 }
6.14
6.15 +
6.16 /// \brief Issue a new node map writing command for the writer.
6.17 ///
6.18 /// This function issues a new <i> node map writing command</i> to the writer.
6.19 @@ -238,7 +240,8 @@
6.20 /// Conversion operator to LemonWriter. It makes possible
6.21 /// to access the encapsulated \e LemonWriter, this way
6.22 /// you can attach to this writer new instances of
6.23 - /// \e LemonWriter::SectionWriter.
6.24 + /// \e LemonWriter::SectionWriter. For more details see
6.25 + /// the \ref rwbackground "Background of Reading and Writing".
6.26 operator LemonWriter&() {
6.27 return *writer;
6.28 }
6.29 @@ -568,7 +571,7 @@
6.30 ///
6.31 /// This function issues a new <i> undirected edge map writing
6.32 /// command</i> to the writer.
6.33 - template <typename Writer, typename Map>
6.34 + template <typename Writer, typename Map>
6.35 UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
6.36 const Writer& writer = Writer()) {
6.37 undir_edgeset_writer.writeUndirEdgeMap(name, map, writer);
7.1 --- a/lemon/lp_glpk.cc Mon Jul 04 17:51:07 2005 +0000
7.2 +++ b/lemon/lp_glpk.cc Tue Jul 05 14:36:10 2005 +0000
7.3 @@ -445,7 +445,7 @@
7.4 switch (lpx_get_dual_stat(lp)) {
7.5 case LPX_D_UNDEF://Undefined (no solve has been run yet)
7.6 return UNDEFINED;
7.7 - case LPX_D_NOFEAS://There is no feasible solution (primal, I guess)
7.8 + case LPX_D_NOFEAS://There is no dual feasible solution
7.9 // case LPX_D_INFEAS://Infeasible
7.10 return INFEASIBLE;
7.11 case LPX_D_FEAS://Feasible