COIN-OR::LEMON - Graph Library

Changeset 1394:f0c48d7fa73d in lemon-0.x for doc


Ignore:
Timestamp:
04/27/05 12:44:58 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1851
Message:

Modifying the interface.
add -> read, write

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/graph_io.dox

    r1333 r1394  
    9090\endcode
    9191
    92 The \c addNodeMap() function declares a \c NodeMap writing command in the
     92The \c writeNodeMap() function declares a \c NodeMap writing command in the
    9393\c GraphWriter. You should give as parameter the name of the map and the map
    9494object. The NodeMap writing command with name "id" should write a
     
    9999\code
    100100IdMap<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 map
     101writer.writeNodeMap("id", nodeIdMap);
     102
     103writer.writeNodeMap("x-coord", xCoordMap);
     104writer.writeNodeMap("y-coord", yCoordMap);
     105writer.writeNodeMap("color", colorMap);
     106\endcode
     107
     108With the \c writeEdgeMap() member function you can give an edge map
    109109writing command similar to the NodeMaps.
    110110
     
    112112\code
    113113DescriptorMap<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 and
     114writer.writeEdgeMap("descriptor", edgeDescMap);
     115
     116writer.writeEdgeMap("weight", weightMap);
     117writer.writeEdgeMap("label", labelMap);
     118\endcode
     119
     120With \c writeNode() and \c writeEdge() functions you can point out Nodes and
    121121Edges in the graph. By example, you can write out the source and target
    122122of the graph.
    123123
    124124\code
    125 writer.addNode("source", sourceNode);
    126 writer.addNode("target", targetNode);
    127 
    128 writer.addEdge("observed", edge);
     125writer.writeNode("source", sourceNode);
     126writer.writeNode("target", targetNode);
     127
     128writer.writeEdge("observed", edge);
    129129\endcode
    130130
     
    152152\endcode
    153153
    154 The \c addNodeMap() function reads a map from the \c \@nodeset section.
     154The \c readNodeMap() function reads a map from the \c \@nodeset section.
    155155If there is a map that you do not want to read from the file and there is
    156156whitespace in the string represenation of the values then you should
     
    159159\see QuotedStringReader
    160160\code
    161 reader.addNodeMap("x-coord", xCoordMap);
    162 reader.addNodeMap("y-coord", yCoordMap);
    163 
    164 reader.addNodeMap<QuotedStringReader>("label", labelMap);
     161reader.readNodeMap("x-coord", xCoordMap);
     162reader.readNodeMap("y-coord", yCoordMap);
     163
     164reader.readNodeMap<QuotedStringReader>("label", labelMap);
    165165reader.skipNodeMap<QuotedStringReader>("description");
    166166
    167 reader.addNodeMap("color", colorMap);
    168 \endcode
    169 
    170 With the \c addEdgeMap() member function you can give an edge map
     167reader.readNodeMap("color", colorMap);
     168\endcode
     169
     170With the \c readEdgeMap() member function you can give an edge map
    171171reading command similar to the NodeMaps.
    172172
    173173\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 and
     174reader.readEdgeMap("weight", weightMap);
     175reader.readEdgeMap("label", labelMap);
     176\endcode
     177
     178With \c readNode() and \c readEdge() functions you can read labeled Nodes and
    179179Edges.
    180180
    181181\code
    182 reader.addNode("source", sourceNode);
    183 reader.addNode("target", targetNode);
    184 
    185 reader.addEdge("observed", edge);
     182reader.readNode("source", sourceNode);
     183reader.readNode("target", targetNode);
     184
     185reader.readEdge("observed", edge);
    186186\endcode
    187187
     
    231231};
    232232...
    233 reader.addNodeMap<LengthReader>("strings", lengthMap);
     233reader.readNodeMap<LengthReader>("strings", lengthMap);
    234234\endcode 
    235235
Note: See TracChangeset for help on using the changeset viewer.