DfsWizard

Declared in lemon/dfs.h, in the group Graph Search; the same class on the Doxygen site.

template< class TR >
class DfsWizard : public TR

Auxiliary class for the function-type interface of DFS algorithm.

This auxiliary class is created to implement the function-type interface of Dfs algorithm. It does not have own run() method, it uses the functions and features of the plain Dfs.

This class should only be used through the dfs() function, which makes it easier to use the algorithm.

Template Parameters:

TR – The traits class that defines various types used by the algorithm.

Public Functions

inline DfsWizard()

Constructor.

inline DfsWizard( const Digraph & g )

Constructor that requires parameters. These parameters will be the default values for the traits class.

Parameters:

g – The digraph the algorithm runs on.

inline DfsWizard( const TR & b )

Copy constructor.

inline void run( Node s )

Runs DFS algorithm from the given source node.

This method runs DFS algorithm from node s in order to compute the DFS path to each node.

inline bool run( Node s , Node t )

Finds the DFS path between s and t.

This method runs DFS algorithm from node s in order to compute the DFS path to node t (it stops searching when t is reached).

Returns:

true if t is reachable form s.

inline void run()

Runs DFS algorithm to visit all nodes in the digraph.

This method runs DFS algorithm in order to visit all nodes in the digraph.

template< class T >
inline DfsWizard< SetPredMapBase< T > > predMap( const T & t )

Named parameter for setting the predecessor map.

Named parameter function for setting the map that stores the predecessor arcs of the nodes.

template< class T >
inline DfsWizard< SetReachedMapBase< T > > reachedMap( const T & t )

Named parameter for setting the reached map.

Named parameter function for setting the map that indicates which nodes are reached.

template< class T >
inline DfsWizard< SetDistMapBase< T > > distMap( const T & t )

Named parameter for setting the distance map.

Named parameter function for setting the map that stores the distances of the nodes calculated by the algorithm.

template< class T >
inline DfsWizard< SetProcessedMapBase< T > > processedMap( const T & t )

Named parameter for setting the processed map.

Named parameter function for setting the map that indicates which nodes are processed.

template< class T >
inline DfsWizard< SetPathBase< T > > path( const T & t )

Named parameter for getting the DFS path to the target node.

inline DfsWizard dist( const int & d )

Named parameter for getting the distance of the target node.

template< class T >
struct SetPredMapBase : public Base

Public Types

typedef T PredMap

Public Functions

inline SetPredMapBase( const TR & b )

Public Static Functions

static inline PredMap * createPredMap( const Digraph & )
template< class T >
struct SetReachedMapBase : public Base

Public Types

typedef T ReachedMap

Public Functions

inline SetReachedMapBase( const TR & b )

Public Static Functions

static inline ReachedMap * createReachedMap( const Digraph & )
template< class T >
struct SetDistMapBase : public Base

Public Types

typedef T DistMap

Public Functions

inline SetDistMapBase( const TR & b )

Public Static Functions

static inline DistMap * createDistMap( const Digraph & )
template< class T >
struct SetProcessedMapBase : public Base

Public Types

typedef T ProcessedMap

Public Functions

inline SetProcessedMapBase( const TR & b )

Public Static Functions

static inline ProcessedMap * createProcessedMap( const Digraph & )
template< class T >
struct SetPathBase : public Base

Public Types

typedef T Path

Public Functions

inline SetPathBase( const TR & b )