template<typename GR>
class lemon::GraphReader< GR >
This utility reads an LGF file.
It can be used almost the same way as DigraphReader. The only difference is that this class can handle edges and edge maps as well as arcs and arc maps.
The columns in the @edges (or @arcs) section are the edge maps. However, if there are two maps with the same name prefixed with '+' and '-', then these can be read into an arc map. Similarly, an attribute can be read into an arc, if it's value is an edge label prefixed with '+' or '-'.
|
| | GraphReader (GR &graph, std::istream &is=std::cin) |
| | Constructor. More...
|
| |
| | GraphReader (GR &graph, const std::string &fn) |
| | Constructor. More...
|
| |
| | GraphReader (GR &graph, const char *fn) |
| | Constructor. More...
|
| |
|
| ~GraphReader () |
| | Destructor.
|
| |
|
| template<typename Map > |
| GraphReader & | nodeMap (const std::string &caption, Map &map) |
| | Node map reading rule. More...
|
| |
| template<typename Map , typename Converter > |
| GraphReader & | nodeMap (const std::string &caption, Map &map, const Converter &converter=Converter()) |
| | Node map reading rule. More...
|
| |
| template<typename Map > |
| GraphReader & | edgeMap (const std::string &caption, Map &map) |
| | Edge map reading rule. More...
|
| |
| template<typename Map , typename Converter > |
| GraphReader & | edgeMap (const std::string &caption, Map &map, const Converter &converter=Converter()) |
| | Edge map reading rule. More...
|
| |
| template<typename Map > |
| GraphReader & | arcMap (const std::string &caption, Map &map) |
| | Arc map reading rule. More...
|
| |
| template<typename Map , typename Converter > |
| GraphReader & | arcMap (const std::string &caption, Map &map, const Converter &converter=Converter()) |
| | Arc map reading rule. More...
|
| |
| template<typename Value > |
| GraphReader & | attribute (const std::string &caption, Value &value) |
| | Attribute reading rule. More...
|
| |
| template<typename Value , typename Converter > |
| GraphReader & | attribute (const std::string &caption, Value &value, const Converter &converter=Converter()) |
| | Attribute reading rule. More...
|
| |
| GraphReader & | node (const std::string &caption, Node &node) |
| | Node reading rule. More...
|
| |
| GraphReader & | edge (const std::string &caption, Edge &edge) |
| | Edge reading rule. More...
|
| |
| GraphReader & | arc (const std::string &caption, Arc &arc) |
| | Arc reading rule. More...
|
| |
|
| GraphReader & | nodes (const std::string &caption) |
| | Set @nodes section to be read. More...
|
| |
| GraphReader & | edges (const std::string &caption) |
| | Set @edges section to be read. More...
|
| |
| GraphReader & | attributes (const std::string &caption) |
| | Set @attributes section to be read. More...
|
| |
|
| template<typename Map > |
| GraphReader & | useNodes (const Map &map) |
| | Use previously constructed node set. More...
|
| |
| template<typename Map , typename Converter > |
| GraphReader & | useNodes (const Map &map, const Converter &converter=Converter()) |
| | Use previously constructed node set. More...
|
| |
| template<typename Map > |
| GraphReader & | useEdges (const Map &map) |
| | Use previously constructed edge set. More...
|
| |
| template<typename Map , typename Converter > |
| GraphReader & | useEdges (const Map &map, const Converter &converter=Converter()) |
| | Use previously constructed edge set. More...
|
| |
| GraphReader & | skipNodes () |
| | Skip the reading of node section. More...
|
| |
| GraphReader & | skipEdges () |
| | Skip the reading of edge section. More...
|
| |
|
| void | run () |
| | Start the batch processing. More...
|
| |