PathWriter< Path > Class Template Reference


Detailed Description

template<typename Path>
class lemon::PathWriter< Path >

This class can write paths into files. You can store paths in distinict mapset or in attributes section.

      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();

Warning:
Do not use this class to write node or edge map values into usual nodesets or edgesets. You will not be able to read back your paths. Rather use NodeMapWriter, EdgeSetWriter or UEdgeSetWriter to dump paths from maps to lemon file.
#include <lemon/path_utils.h>

List of all members.

Public Member Functions

template<typename EdgeLabelWriter >
 PathWriter (const EdgeLabelWriter &_edgeLabelWriter)
 Constructor.
void write (std::ostream &os, const Value &value) const
 Writer function.


Constructor & Destructor Documentation

PathWriter ( const EdgeLabelWriter &  _edgeLabelWriter  )  [inline, explicit]

The paramter shold be an edge label writer which could be a GraphWriter or an EdgeSetWriter.


Member Function Documentation

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.


Generated on Thu Jun 4 04:06:36 2009 for LEMON by  doxygen 1.5.9