Loading...
Searching...
No Matches
DfsVisitor< GR > Struct Template Reference

## Detailed Description

template<typename GR>
struct lemon::DfsVisitor< GR >

This class defines the interface of the DfsVisit events, and it could be the base of a real visitor class.

`#include <lemon/dfs.h>`

## Public Member Functions

void | start (const Node &node)
| Called for the source node of the DFS.
void | stop (const Node &node)
| Called when the source node is leaved.
void | reach (const Node &node)
| Called when a node is reached first time.
void | discover (const Arc &arc)
| Called when an arc reaches a new node.
void | examine (const Arc &arc)
| Called when an arc is examined but its target node is already discovered.
void | leave (const Node &node)
| Called when the DFS steps back from a node.
void | backtrack (const Arc &arc)
| Called when the DFS steps back on an arc.

## Member Function Documentation

## start()

template<typename GR>

void start | ( | const Node & | node | ) |

inline

This function is called for the source node of the DFS.

## stop()

template<typename GR>

void stop | ( | const Node & | node | ) |

inline

This function is called when the source node is leaved.

## reach()

template<typename GR>

void reach | ( | const Node & | node | ) |

inline

This function is called when a node is reached first time.

## discover()

template<typename GR>

void discover | ( | const Arc & | arc | ) |

inline

This function is called when the DFS finds an arc whose target node is not reached yet.

## examine()

template<typename GR>

void examine | ( | const Arc & | arc | ) |

inline

This function is called when an arc is examined but its target node is already discovered.

## leave()

template<typename GR>

void leave | ( | const Node & | node | ) |

inline

This function is called when the DFS steps back from a node.

## backtrack()

template<typename GR>

void backtrack | ( | const Arc & | arc | ) |

inline

This function is called when the DFS steps back on an arc.