Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Full3ComponentGeneratorEnumeration.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37namespace steiner_tree {
38
40template<typename T>
42public:
43 void call(const EdgeWeightedGraph<T>& G, const List<node>& terminals,
44 const NodeArray<bool>& isTerminal, const NodeArray<NodeArray<T>>& distance,
45 const NodeArray<NodeArray<edge>>& pred,
46 std::function<void(node, node, node, node, T)> generateFunction) const {
47 this->forAllTerminalTriples(terminals, distance,
48 [&](node u, node v, node w, const NodeArray<T>& uDistance,
50 node center = nullptr;
51 T minCost = std::numeric_limits<T>::max();
52 for (node x : G.nodes) {
54 }
55 this->checkAndGenerateFunction(u, v, w, center, minCost, pred, isTerminal,
57 });
58 }
59};
60
61}
62}
Definition of ogdf::steiner_tree::Full3ComponentGeneratorModule class template.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
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
Generate full components and call generateFunction for each full component.
Interface for full 3-component generation including auxiliary functions.
void updateBestCenter(node x, node &center, 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.
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
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.