diff -r 1af977819111 -r 9c23c3762bc5 doc/graph_io.dox --- a/doc/graph_io.dox Sat Oct 20 14:29:12 2007 +0000 +++ b/doc/graph_io.dox Wed Oct 24 16:31:49 2007 +0000 @@ -335,7 +335,7 @@ The specialization of writing is very similar to that of reading. -\section u Undirected graphs +\section undir Undirected and Bipartite graphs In a file describing an undirected graph (ugraph, for short) you find an \c uedgeset section instead of the \c edgeset section. The first line of @@ -343,9 +343,9 @@ next lines describe one undirected edge with the the incident nodes and the values of the map. -The format handles directed edge maps as a syntactical sugar???, if there -are two maps with names being the same with a \c '+' and a \c '-' prefix -then this will be read as a directed map. +The format could store directed edge maps, if there are two maps with +names being the same with a \c '+' and a \c '-' prefix then this could +be read as such a map. \code @uedgeset @@ -386,6 +386,35 @@ reader.readEdge("edge", edge); \endcode +The undirected bipartite graphs could be read with the \c BpUGraph +class and it has specialized nodeset section, which should be start +with \c "@bpnodeset". This section is separated to two +subsections. The header line of these sections start with "&anodeset" +or "&bnodeset" and after that the line contains the names of the +regular and A-node or B-node maps accordingly. The lines of each +section contains the mapped values. The labels of the graph should be +unique overall both subsections. + +\code +@bpnodeset +&anodeset label coords radius + 0 (0, 0) 14.0 + 1 (0, 1) 12.0 +&bnodeset label coords + 2 (1, 0) + 3 (1, 1) +\endcode + +The reading can be done with \ref lemon::BpUGraphReader::readANodeMap() +"readANodeMap()", \ref lemon::BpUGraphReader::readBNodeMap() +"readBNodeMap()" or \ref lemon::BpUGraphReader::readNodeMap() +"readNodeMap()" members. + +\code +reader.readNodeMap("coords", coords); +reader.readAnodeMap("radius", radius); +\endcode + \section advanced Advanced features The graph reader and writer classes give an easy way to read and write