Changeset 1118:62296604afb4 in lemon-0.x for doc
- Timestamp:
- 02/02/05 17:23:41 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1517
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graph_io.dox
r1114 r1118 1 namespace lemon { 1 2 /*! 2 3 … … 6 7 7 8 The standard graph IO makes possible to store graphs and additional maps 8 in flexible and efficient way.9 in a flexible and efficient way. 9 10 10 11 \section format The general file format … … 34 35 same coloumn oriented structure. It starts with the line \c \@edgeset 35 36 The next line contains the whitespace separated list of names of the map. 36 Each of the next lines describes one edge. The first two element in the line37 is the ID of the source and target node as occursin the first node map.37 Each of the next lines describes one edge. The first two elements in the line 38 are the ID of the source and target node as they occur in the first node map. 38 39 39 40 \code … … 45 46 \endcode 46 47 47 The next section contains outpointed nodes. The section starts with 48 The next section contains <em>labeles nodes</em> (i.e. nodes having a special 49 label on them). The section starts with 48 50 \c \@nodes. Each of the next lines contains a label for a node in the graph 49 51 and then the ID described in the first column in the nodeset. … … 55 57 \endcode 56 58 57 The last section describes the outpointed edges. It starts with \c \@edges 59 The last section describes the <em>labeles edges</em> 60 (i.e. edges having a special 61 label on them). It starts with \c \@edges 58 62 and then each line contains the name of the edge and the ID. 59 63 … … 74 78 \section use Using graph input-output 75 79 The graph input and output based on writing and reading commands. The user 76 adds writing and reading commands for the reader or writer class, after77 calls the \c run() method what executes all the given commands.80 adds writing and reading commands for the reader or writer class, then 81 calls the \c run() method that executes all the given commands. 78 82 79 83 \subsection write Writing a graph … … 81 85 The \c GraphWriter class provides the graph output. To write a graph 82 86 you should first give writing commands for the writer. You can declare 83 write command as \c NodeMap or \c EdgeMap writing and outpointed Node and87 write command as \c NodeMap or \c EdgeMap writing and labeled Node and 84 88 Edge writing. 85 89 … … 90 94 The \c addNodeMap() function declares a \c NodeMap writing command in the 91 95 \c GraphWriter. You should give as parameter the name of the map and the map 92 object. The first NodeMap writing command should write a nunique map because96 object. The first NodeMap writing command should write a unique map because 93 97 it is regarded as ID map. 94 98 … … 129 133 130 134 After you give all write commands you must call the \c run() member 131 function, wh atexecute all the write commands.135 function, which execute all the write commands. 132 136 133 137 \code … … 137 141 \subsection reading Reading a graph 138 142 139 The given file format may contain many maps and outpointed nodes or edges.143 The given file format may contain several maps and labeled nodes or edges. 140 144 If you read a graph you need not read all the maps and items just those 141 145 that you need. The interface of the \c GraphReader is very similar to … … 143 147 given commands. 144 148 145 The reader object suppose that each not readed value does not contain s146 whitespaces therefore it has some extra possibilities to control how could147 it s kip the values when the string representation contains spaces.149 The reader object suppose that each not readed value does not contain 150 whitespaces, therefore it has some extra possibilities to control how 151 it should skip the values when the string representation contains spaces. 148 152 149 153 \code … … 152 156 153 157 The \c addNodeMap() function reads a map from the \c \@nodeset section. 154 If there is a map what you do not want to read from the file and there is158 If there is a map that you do not want to read from the file and there is 155 159 whitespace in the string represenation of the values then you should 156 160 call the \c skipNodeMap() template member function with proper parameters. … … 175 179 \endcode 176 180 177 With \c addNode() and \c addEdge() functions you can read outpointed Nodes and181 With \c addNode() and \c addEdge() functions you can read labeled Nodes and 178 182 Edges. 179 183 … … 186 190 187 191 After you give all read commands you must call the \c run() member 188 function, wh atexecute all the commands.192 function, which execute all the commands. 189 193 190 194 \code … … 234 238 235 239 The global functionality of the reader class can be changed by giving a 236 special template parameter for the GraphReader class. In default waythe237 template parameter the\c DefaultReaderTraits. A reader traits class240 special template parameter for the GraphReader class. By default, the 241 template parameter is \c DefaultReaderTraits. A reader traits class 238 242 should provide an inner template class Reader for each type, and an 239 243 DefaultReader for skipping a value. … … 243 247 244 248 */ 249 }
Note: See TracChangeset
for help on using the changeset viewer.