Interface for full 3-component generation including auxiliary functions. More...
#include <ogdf/graphalg/steiner_tree/Full3ComponentGeneratorModule.h>
Public Member Functions | |
Full3ComponentGeneratorModule ()=default | |
virtual | ~Full3ComponentGeneratorModule ()=default |
virtual void | call (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, const NodeArray< NodeArray< T > > &distance, const NodeArray< NodeArray< edge > > &pred, std::function< void(node, node, node, node, T)> generateFunction) const =0 |
Generate full components and call generateFunction for each full component. | |
Protected Member Functions | |
void | checkAndGenerateFunction (node u, node v, node w, node center, T minCost, const NodeArray< NodeArray< edge > > &pred, const NodeArray< bool > &isTerminal, std::function< void(node, node, node, node, T)> generateFunction) const |
void | forAllTerminalTriples (const List< node > &terminals, const NodeArray< NodeArray< T > > &distance, std::function< void(node, node, node, const NodeArray< T > &, const NodeArray< T > &, const NodeArray< T > &)> func) const |
void | updateBestCenter (node x, node ¢er, T &minCost, const NodeArray< T > &dist1, const NodeArray< T > &dist2, const NodeArray< T > &dist3) const |
Update center node if it is the best so far. | |
Interface for full 3-component generation including auxiliary functions.
A full 3-component is basically a tree with exactly three terminal leaves but no inner terminals. There must be exactly one nonterminal of degree 3, the so-called center.
Definition at line 47 of file Full3ComponentGeneratorModule.h.
|
default |
|
virtualdefault |
|
pure virtual |
Generate full components and call generateFunction
for each full component.
Implemented in ogdf::steiner_tree::Full3ComponentGeneratorEnumeration< T >, and ogdf::steiner_tree::Full3ComponentGeneratorVoronoi< T >.
|
inlineprotected |
Definition at line 98 of file Full3ComponentGeneratorModule.h.
|
inlineprotected |
Definition at line 84 of file Full3ComponentGeneratorModule.h.
|
inlineprotected |
Update center node if it is the best so far.
(Just a helper to avoid code duplication.)
x | The node to test |
center | The returned best center node |
minCost | The returned cost of the component with that node |
dist1 | SSSP distance vector of the first terminal |
dist2 | SSSP distance vector of the second terminal |
dist3 | SSSP distance vector of the third terminal |
Definition at line 68 of file Full3ComponentGeneratorModule.h.