diff -r 5767cc417f62 -r 62296604afb4 doc/graph_io.dox --- a/doc/graph_io.dox Wed Feb 02 13:11:54 2005 +0000 +++ b/doc/graph_io.dox Wed Feb 02 16:23:41 2005 +0000 @@ -1,3 +1,4 @@ +namespace lemon { /*! @@ -5,7 +6,7 @@ \page graph-io-page Graph Input-Output The standard graph IO makes possible to store graphs and additional maps -in flexible and efficient way. +in a flexible and efficient way. \section format The general file format @@ -33,8 +34,8 @@ The edgeset section is very similar to the nodeset section, it has same coloumn oriented structure. It starts with the line \c \@edgeset The next line contains the whitespace separated list of names of the map. -Each of the next lines describes one edge. The first two element in the line -is the ID of the source and target node as occurs in the first node map. +Each of the next lines describes one edge. The first two elements in the line +are the ID of the source and target node as they occur in the first node map. \code @edgeset @@ -44,7 +45,8 @@ 3 12 g 3.4 g-edge \endcode -The next section contains outpointed nodes. The section starts with +The next section contains labeles nodes (i.e. nodes having a special +label on them). The section starts with \c \@nodes. Each of the next lines contains a label for a node in the graph and then the ID described in the first column in the nodeset. @@ -54,7 +56,9 @@ target 12 \endcode -The last section describes the outpointed edges. It starts with \c \@edges +The last section describes the labeles edges +(i.e. edges having a special +label on them). It starts with \c \@edges and then each line contains the name of the edge and the ID. \code @@ -73,14 +77,14 @@ \section use Using graph input-output The graph input and output based on writing and reading commands. The user -adds writing and reading commands for the reader or writer class, after -calls the \c run() method what executes all the given commands. +adds writing and reading commands for the reader or writer class, then +calls the \c run() method that executes all the given commands. \subsection write Writing a graph The \c GraphWriter class provides the graph output. To write a graph you should first give writing commands for the writer. You can declare -write command as \c NodeMap or \c EdgeMap writing and outpointed Node and +write command as \c NodeMap or \c EdgeMap writing and labeled Node and Edge writing. \code @@ -89,7 +93,7 @@ The \c addNodeMap() function declares a \c NodeMap writing command in the \c GraphWriter. You should give as parameter the name of the map and the map -object. The first NodeMap writing command should write an unique map because +object. The first NodeMap writing command should write a unique map because it is regarded as ID map. \see IdMap, DescriptorMap @@ -128,7 +132,7 @@ \endcode After you give all write commands you must call the \c run() member -function, what execute all the write commands. +function, which execute all the write commands. \code writer.run(); @@ -136,22 +140,22 @@ \subsection reading Reading a graph -The given file format may contain many maps and outpointed nodes or edges. +The given file format may contain several maps and labeled nodes or edges. If you read a graph you need not read all the maps and items just those that you need. The interface of the \c GraphReader is very similar to the GraphWriter but the reading method does not depend on the order the given commands. -The reader object suppose that each not readed value does not contains -whitespaces therefore it has some extra possibilities to control how could -it skip the values when the string representation contains spaces. +The reader object suppose that each not readed value does not contain +whitespaces, therefore it has some extra possibilities to control how +it should skip the values when the string representation contains spaces. \code GraphReader reader(graph); \endcode The \c addNodeMap() function reads a map from the \c \@nodeset section. -If there is a map what you do not want to read from the file and there is +If there is a map that you do not want to read from the file and there is whitespace in the string represenation of the values then you should call the \c skipNodeMap() template member function with proper parameters. @@ -174,7 +178,7 @@ reader.addEdgeMap("label", labelMap); \endcode -With \c addNode() and \c addEdge() functions you can read outpointed Nodes and +With \c addNode() and \c addEdge() functions you can read labeled Nodes and Edges. \code @@ -185,7 +189,7 @@ \endcode After you give all read commands you must call the \c run() member -function, what execute all the commands. +function, which execute all the commands. \code reader.run(); @@ -233,8 +237,8 @@ \endcode The global functionality of the reader class can be changed by giving a -special template parameter for the GraphReader class. In default way the -template parameter the \c DefaultReaderTraits. A reader traits class +special template parameter for the GraphReader class. By default, the +template parameter is \c DefaultReaderTraits. A reader traits class should provide an inner template class Reader for each type, and an DefaultReader for skipping a value. @@ -242,3 +246,4 @@ */ +} \ No newline at end of file