GraphWriter<SmartGraph> gw(std::cout, g); NodeMapWriter<SmartGraph> nmw(gw, g, gw); SmartGraph::NodeMap<Path<SmartGraph> > pnm(g); for (SmartGraph::NodeIt n(g); n != INVALID; ++n) { pnm[n] = bfs.path(n); } nmw.writeNodeMap("pnm", pnm, PathWriter<Path<SmartGraph> >(gw)); gw.run();
#include <lemon/path_utils.h>
Public Member Functions | |
template<typename EdgeLabelWriter > | |
PathWriter (const EdgeLabelWriter &_edgeLabelWriter) | |
Constructor. | |
void | write (std::ostream &os, const Value &value) const |
Writer function. |
PathWriter | ( | const EdgeLabelWriter & | _edgeLabelWriter | ) | [inline, explicit] |
The paramter shold be an edge label writer which could be a GraphWriter or an EdgeSetWriter.
void write | ( | std::ostream & | os, | |
const Value & | value | |||
) | const [inline] |
Writes the path to the current stream. The representation is the edge labels beetween parentheses.