Changeset 1394:f0c48d7fa73d in lemon-0.x for doc
- Timestamp:
- 04/27/05 12:44:58 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1851
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graph_io.dox
r1333 r1394 90 90 \endcode 91 91 92 The \c addNodeMap() function declares a \c NodeMap writing command in the92 The \c writeNodeMap() function declares a \c NodeMap writing command in the 93 93 \c GraphWriter. You should give as parameter the name of the map and the map 94 94 object. The NodeMap writing command with name "id" should write a … … 99 99 \code 100 100 IdMap<ListGraph, Node> nodeIdMap; 101 writer. addNodeMap("id", nodeIdMap);102 103 writer. addNodeMap("x-coord", xCoordMap);104 writer. addNodeMap("y-coord", yCoordMap);105 writer. addNodeMap("color", colorMap);106 \endcode 107 108 With the \c addEdgeMap() member function you can give an edge map101 writer.writeNodeMap("id", nodeIdMap); 102 103 writer.writeNodeMap("x-coord", xCoordMap); 104 writer.writeNodeMap("y-coord", yCoordMap); 105 writer.writeNodeMap("color", colorMap); 106 \endcode 107 108 With the \c writeEdgeMap() member function you can give an edge map 109 109 writing command similar to the NodeMaps. 110 110 … … 112 112 \code 113 113 DescriptorMap<ListGraph, Edge, ListGraph::EdgeMap<int> > edgeDescMap(graph); 114 writer. addEdgeMap("descriptor", edgeDescMap);115 116 writer. addEdgeMap("weight", weightMap);117 writer. addEdgeMap("label", labelMap);118 \endcode 119 120 With \c addNode() and \c addEdge() functions you can point out Nodes and114 writer.writeEdgeMap("descriptor", edgeDescMap); 115 116 writer.writeEdgeMap("weight", weightMap); 117 writer.writeEdgeMap("label", labelMap); 118 \endcode 119 120 With \c writeNode() and \c writeEdge() functions you can point out Nodes and 121 121 Edges in the graph. By example, you can write out the source and target 122 122 of the graph. 123 123 124 124 \code 125 writer. addNode("source", sourceNode);126 writer. addNode("target", targetNode);127 128 writer. addEdge("observed", edge);125 writer.writeNode("source", sourceNode); 126 writer.writeNode("target", targetNode); 127 128 writer.writeEdge("observed", edge); 129 129 \endcode 130 130 … … 152 152 \endcode 153 153 154 The \c addNodeMap() function reads a map from the \c \@nodeset section.154 The \c readNodeMap() function reads a map from the \c \@nodeset section. 155 155 If there is a map that you do not want to read from the file and there is 156 156 whitespace in the string represenation of the values then you should … … 159 159 \see QuotedStringReader 160 160 \code 161 reader. addNodeMap("x-coord", xCoordMap);162 reader. addNodeMap("y-coord", yCoordMap);163 164 reader. addNodeMap<QuotedStringReader>("label", labelMap);161 reader.readNodeMap("x-coord", xCoordMap); 162 reader.readNodeMap("y-coord", yCoordMap); 163 164 reader.readNodeMap<QuotedStringReader>("label", labelMap); 165 165 reader.skipNodeMap<QuotedStringReader>("description"); 166 166 167 reader. addNodeMap("color", colorMap);168 \endcode 169 170 With the \c addEdgeMap() member function you can give an edge map167 reader.readNodeMap("color", colorMap); 168 \endcode 169 170 With the \c readEdgeMap() member function you can give an edge map 171 171 reading command similar to the NodeMaps. 172 172 173 173 \code 174 reader. addEdgeMap("weight", weightMap);175 reader. addEdgeMap("label", labelMap);176 \endcode 177 178 With \c addNode() and \c addEdge() functions you can read labeled Nodes and174 reader.readEdgeMap("weight", weightMap); 175 reader.readEdgeMap("label", labelMap); 176 \endcode 177 178 With \c readNode() and \c readEdge() functions you can read labeled Nodes and 179 179 Edges. 180 180 181 181 \code 182 reader. addNode("source", sourceNode);183 reader. addNode("target", targetNode);184 185 reader. addEdge("observed", edge);182 reader.readNode("source", sourceNode); 183 reader.readNode("target", targetNode); 184 185 reader.readEdge("observed", edge); 186 186 \endcode 187 187 … … 231 231 }; 232 232 ... 233 reader. addNodeMap<LengthReader>("strings", lengthMap);233 reader.readNodeMap<LengthReader>("strings", lengthMap); 234 234 \endcode 235 235
Note: See TracChangeset
for help on using the changeset viewer.