MinLCA algorithms
|
Class for greedy algorithms using a breadth-first search. More...
#include <greedy.hh>
Public Member Functions | |
TEMPLATE_GRAPH_TYPEDEFS (Graph) | |
MinLCAGreedyBfs (const Graph &g, int maxK=0) | |
Constructor for the algorithm class. More... | |
virtual | ~MinLCAGreedyBfs () |
Destructor. | |
virtual void | init () |
void | setSourceNodes (const std::list< Node > &sources) |
Set source vertices. More... | |
void | setSourceNode (const Node &v) |
Set source node. More... | |
virtual MinLCAStatus | run () |
Protected Types | |
typedef Greedy< Graph > | BaseGreedy |
The greedy algorithm. | |
typedef MinLCAGreedyBfs< Greedy, Graph > | Visitor |
This class. | |
Protected Attributes | |
std::list< Node > | _sources |
List of source nodes for BFS. | |
lemon::BfsVisit< Graph, Visitor > * | _bfs |
Pointer to the visitor class. | |
Private Member Functions | |
void | connectedComponentsSourceNodes () |
Set sources to one vertex of each connected component. More... | |
void | process (const Node &v) |
Process vertex. More... | |
Friends | |
class | lemon::BfsVisit< Graph, Visitor > |
Class for greedy algorithms using a breadth-first search.
|
inline |
Constructor for the algorithm class.
|
inlineprivate |
|
inlineprivate |
Process vertex.
Overrides lemon::BfsVisitor::process(const Node&). Makes use of MinLCAGreedy::paintVertex(const Node &).
|
inline |
|
inline |
Set source vertices.
Set the source vertices for the BFS to a list of nodes. If sources are not explicitly set, by default they are set to a list of vertices representing the connected components.
sources | List of sources |