|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
41 class EdgeWeightedGraph;
43 namespace steiner_tree {
53 class Full3ComponentGeneratorModule {
59 virtual void call(
const EdgeWeightedGraph<T>& G,
const List<node>& terminals,
60 const NodeArray<bool>& isTerminal,
const NodeArray<NodeArray<T>>& distance,
76 #ifdef OGDF_FULL_COMPONENT_GENERATION_ALWAYS_SAFE
79 if (dist1[x] < std::numeric_limits<T>::max() && dist2[x] < std::numeric_limits<T>::max()
80 && dist3[x] < std::numeric_limits<T>::max()) {
82 const T tmp = dist1[x] + dist2[x] + dist3[x];
98 func(*it_u, *it_v, *it_w, distance[*it_u], distance[*it_v], distance[*it_w]);
107 if (center && !isTerminal[center] && pred[u][center] && pred[v][center] && pred[w][center]) {
108 generateFunction(u, v, w, center, minCost);
The namespace for all OGDF objects.
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
Includes declaration of graph class.
internal::GraphRegisteredArray< NodeElement, Value, WithDefault > NodeArray
RegisteredArray for labeling the nodes in a Graph with an arbitrary Value.
ListIteratorBase< E, isConst, isReverse > succ() const
Returns successor iterator.
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
virtual ~Full3ComponentGeneratorModule()=default
NodeElement * node
The type of nodes.
Doubly linked lists (maintaining the length of the list).
RegisteredArray for nodes, edges and adjEntries of a graph.
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.
Declaration of doubly linked lists and iterators.
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.
Encapsulates a pointer to a list element.
Class for the representation of nodes.
Full3ComponentGeneratorModule()=default