The first line of the section contains the names of the maps separated with white spaces. Each next lines describes an undirected edge in the edgeset. The line contains the two connected nodes' id and the mapped values for each undirected map.
The section can handle the directed as a syntactical sugar. Two undirected edge map describes one directed edge map. This two maps are the forward map and the backward map and the names of this map is near the same just with a prefix '+'
or '-'
character difference.
The undirected edgeset writer needs a node id writer to identify which nodes have to be connected. If a NodeSetWriter can write the nodes' id, it will be able to use with this class.
|
Public Member Functions |
template<typename NodeIdWriter> |
| UndirEdgeSetWriter (LemonWriter &_writer, const Graph &_graph, const NodeIdWriter &_nodeIdWriter, const std::string &_id=std::string(), bool _forceIdMap=true) |
| Constructor.
|
virtual | ~UndirEdgeSetWriter () |
| Destructor.
|
template<typename Map> |
UndirEdgeSetWriter & | writeUndirEdgeMap (std::string name, const Map &map) |
| Add a new undirected edge map writer command for the writer.
|
template<typename Writer, typename Map> |
UndirEdgeSetWriter & | writeUndirEdgeMap (std::string name, const Map &map, const Writer &writer=Writer()) |
| Add a new undirected map writer command for the writer.
|
template<typename Map> |
UndirEdgeSetWriter & | writeEdgeMap (std::string name, const Map &map) |
| Add a new directed edge map writer command for the writer.
|
template<typename Writer, typename Map> |
UndirEdgeSetWriter & | writeEdgeMap (std::string name, const Map &map, const Writer &writer=Writer()) |
| Add a new directed map writer command for the writer.
|
bool | isIdWriter () const |
| Returns true if the undirected edgeset can write the ids of the edges.
|
void | writeId (std::ostream &os, const UndirEdge &item) const |
| Write the id of the given undirected edge.
|
void | writeId (std::ostream &os, const Edge &item) const |
| Write the id of the given edge.
|
Protected Member Functions |
virtual std::string | header () |
| The header of the section.
|
virtual void | write (std::ostream &os) |
| Writer function of the section.
|