Changeset 1901:723b2b81d900 in lemon-0.x for doc/graph_io.dox
- Timestamp:
- 01/24/06 17:07:38 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2476
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graph_io.dox
r1848 r1901 32 32 The next line contains the names of the nodemaps, separated by whitespaces. Each 33 33 following line describes a node in the graph: it contains the values of the 34 maps in the right order. The map named " id" should contain unique values35 because it is regarded as a n ID-map. These ids need not be numbers but they34 maps in the right order. The map named "label" should contain unique values 35 because it is regarded as a label map. These labels need not be numbers but they 36 36 must identify the nodes uniquely for later reference. For example: 37 37 38 38 \code 39 39 @nodeset 40 idx-coord y-coord color40 label x-coord y-coord color 41 41 3 1.0 4.0 blue 42 42 5 2.3 5.7 red … … 51 51 The next line contains the whitespace separated list of names of the edge 52 52 maps. Each of the next lines describes one edge. The first two elements in 53 the line are the IDs of the source and target (or tail and head) nodes of the54 edge as they occur in the IDnode map of the nodeset section. You can also55 have an optional IDmap on the edges for later reference (which has to be53 the line are the labels of the source and target (or tail and head) nodes of the 54 edge as they occur in the label node map of the nodeset section. You can also 55 have an optional label map on the edges for later reference (which has to be 56 56 unique in this case). 57 57 58 58 \code 59 59 @edgeset 60 id weight label61 3 5 a 4.3 a-edge62 5 12 c 2.6 c-edge63 3 12 g 3.4 g-edge60 label weight note 61 3 5 a 4.3 a-edge 62 5 12 c 2.6 c-edge 63 3 12 g 3.4 g-edge 64 64 \endcode 65 65 … … 71 71 72 72 Each of the next lines contains a label for a node in the graph 73 and then the IDas described in the \e nodeset section.73 and then the label as described in the \e nodeset section. 74 74 75 75 \code … … 81 81 The last section describes the <em>labeled (distinguished) edges</em> 82 82 (i.e. edges having a special label on them). It starts with \c \@edges 83 and then each line contains the name of the edge and the ID.83 and then each line contains the name of the edge and the label. 84 84 85 85 \code … … 104 104 \endcode 105 105 106 <tt> \@end </tt> 107 108 line. 106 Finally, the file should be closed with \c \@end line. 109 107 110 108 … … 133 131 \ref lemon::GraphWriter "GraphWriter". 134 132 You should give a name to the map and the map 135 object as parameters. The NodeMap writing command with name " id" should write a136 unique map because it will be regarded as a n IDmap.133 object as parameters. The NodeMap writing command with name "label" should write a 134 unique map because it will be regarded as a label map. 137 135 138 136 \see IdMap, DescriptorMap 139 137 140 138 \code 141 IdMap<ListGraph, Node> node IdMap;142 writer.writeNodeMap(" id", nodeIdMap);139 IdMap<ListGraph, Node> nodeLabelMap; 140 writer.writeNodeMap("label", nodeLabelMap); 143 141 144 142 writer.writeNodeMap("x-coord", xCoordMap); … … 158 156 159 157 writer.writeEdgeMap("weight", weightMap); 160 writer.writeEdgeMap(" label", labelMap);158 writer.writeEdgeMap("note", noteMap); 161 159 \endcode 162 160 … … 315 313 special template parameter to the GraphReader class. By default, the 316 314 template parameter is \c DefaultReaderTraits. A reader traits class 317 should provide a n innertemplate class Reader for each type, and a315 should provide a nested template class Reader for each type, and a 318 316 DefaultReader for skipping a value. 319 317 320 The specialization of 318 The specialization of writing is very similar to that of reading. 321 319 322 320 \section undir Undirected graphs … … 334 332 \code 335 333 @undiredgeset 336 id capacity +flow-flow337 32 2 1 4.3 2.00.0338 21 21 5 2.6 0.02.6339 21 12 8 3.4 0.00.0334 label capacity +flow -flow 335 32 2 1 4.3 2.0 0.0 336 21 21 5 2.6 0.0 2.6 337 21 12 8 3.4 0.0 0.0 340 338 \endcode 341 339 … … 462 460 and the \ref lemon::UndirGraphReader "UndirGraphReader" can be converted 463 461 to \ref lemon::LemonReader "LemonReader" 464 and it can resolve the ID's of the items, the previous462 and it can resolve the label's of the items, the previous 465 463 result can be achived with the \ref lemon::UndirGraphReader "UndirGraphReader" 466 464 class, too.
Note: See TracChangeset
for help on using the changeset viewer.