COIN-OR::LEMON - Graph Library

Changeset 2502:9c23c3762bc5 in lemon-0.x for doc/graph_io.dox


Ignore:
Timestamp:
10/24/07 18:31:49 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3342
Message:

BpUGraphReader and Writer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/graph_io.dox

    r2391 r2502  
    336336The specialization of writing is very similar to that of reading.
    337337
    338 \section u Undirected graphs
     338\section undir Undirected and Bipartite graphs
    339339
    340340In a file describing an undirected graph (ugraph, for short) you find an
     
    344344values of the map.
    345345
    346 The format handles directed edge maps as a syntactical sugar???, if there
    347 are two maps with names being the same with a \c '+' and a \c '-' prefix
    348 then this will be read as a directed map.
     346The format could store directed edge maps, if there are two maps with
     347names being the same with a \c '+' and a \c '-' prefix then this could
     348be read as such a map.
    349349
    350350\code
     
    385385reader.readUEdge("u_edge", u_edge);
    386386reader.readEdge("edge", edge);
     387\endcode
     388
     389The undirected bipartite graphs could be read with the \c BpUGraph
     390class and it has specialized nodeset section, which should be start
     391with \c "@bpnodeset". This section is separated to two
     392subsections. The header line of these sections start with "&anodeset"
     393or "&bnodeset" and after that the line contains the names of the
     394regular and A-node or B-node maps accordingly. The lines of each
     395section contains the mapped values. The labels of the graph should be
     396unique overall both subsections.
     397
     398\code
     399@bpnodeset
     400&anodeset label   coords        radius
     401          0       (0, 0)        14.0
     402          1       (0, 1)        12.0
     403&bnodeset label   coords
     404          2       (1, 0)
     405          3       (1, 1)
     406\endcode
     407
     408The reading can be done with \ref lemon::BpUGraphReader::readANodeMap()
     409"readANodeMap()", \ref lemon::BpUGraphReader::readBNodeMap()
     410"readBNodeMap()" or \ref lemon::BpUGraphReader::readNodeMap()
     411"readNodeMap()" members.
     412
     413\code
     414reader.readNodeMap("coords", coords);
     415reader.readAnodeMap("radius", radius);
    387416\endcode
    388417
Note: See TracChangeset for help on using the changeset viewer.