template<typename GR>
class lemon::GraphWriter< GR >
This utility writes an LGF file.
It can be used almost the same way as DigraphWriter
. The only difference is that this class can handle edges and edge maps as well as arcs and arc maps.
The arc maps are written into the file as two columns, the caption of the columns are the name of the map prefixed with '+'
and '-'
. The arcs are written into the @attributes
section as a '+'
or a '-'
prefix (depends on the direction of the arc) and the label of corresponding edge.
|
| GraphWriter (const GR &graph, std::ostream &os=std::cout) |
| Constructor.
|
|
| GraphWriter (const GR &graph, const std::string &fn) |
| Constructor.
|
|
| GraphWriter (const GR &graph, const char *fn) |
| Constructor.
|
|
| ~GraphWriter () |
| Destructor.
|
|
|
template<typename Map > |
GraphWriter & | nodeMap (const std::string &caption, const Map &map) |
| Node map writing rule.
|
|
template<typename Map , typename Converter > |
GraphWriter & | nodeMap (const std::string &caption, const Map &map, const Converter &converter=Converter()) |
| Node map writing rule.
|
|
template<typename Map > |
GraphWriter & | edgeMap (const std::string &caption, const Map &map) |
| Edge map writing rule.
|
|
template<typename Map , typename Converter > |
GraphWriter & | edgeMap (const std::string &caption, const Map &map, const Converter &converter=Converter()) |
| Edge map writing rule.
|
|
template<typename Map > |
GraphWriter & | arcMap (const std::string &caption, const Map &map) |
| Arc map writing rule.
|
|
template<typename Map , typename Converter > |
GraphWriter & | arcMap (const std::string &caption, const Map &map, const Converter &converter=Converter()) |
| Arc map writing rule.
|
|
template<typename Value > |
GraphWriter & | attribute (const std::string &caption, const Value &value) |
| Attribute writing rule.
|
|
template<typename Value , typename Converter > |
GraphWriter & | attribute (const std::string &caption, const Value &value, const Converter &converter=Converter()) |
| Attribute writing rule.
|
|
GraphWriter & | node (const std::string &caption, const Node &node) |
| Node writing rule.
|
|
GraphWriter & | edge (const std::string &caption, const Edge &edge) |
| Edge writing rule.
|
|
GraphWriter & | arc (const std::string &caption, const Arc &arc) |
| Arc writing rule.
|
|
|
GraphWriter & | nodes (const std::string &caption) |
|
GraphWriter & | edges (const std::string &caption) |
|
GraphWriter & | attributes (const std::string &caption) |
|
|
GraphWriter & | skipNodes () |
| Skip writing the node set.
|
|
GraphWriter & | skipEdges () |
| Skip writing edge set.
|
|
|
void | run () |
| Start the batch processing.
|
|
std::ostream & | ostream () |
| Give back the stream of the writer.
|
|