42namespace steiner_tree {
71 for (i = 0; i <
inputTree.numberOfEdges(); ++i) {
152 ne0 =
st.newEdge(
st.copy(
t.s0()),
st.copy(
t.s1()), 0);
153 ne1 =
st.newEdge(
st.copy(
t.s0()),
st.copy(
t.s2()), 0);
171#ifdef OGDF_COMMON_ALG_FIND_BEST_TAKAHASHI_ROOT
174 for (
node v : terminals) {
Extends the GraphCopy concept to weighted graphs.
Implementation of the 2(1-1/l)-approximation algorithm for the minimum Steiner tree problem by Matsuy...
The parameterized class Array implements dynamic arrays of type E.
Class for the representation of edges.
node target() const
Returns the target node of the edge.
node source() const
Returns the source node of the edge.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
static void getTerminals(List< node > &terminals, const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal)
Generates a list (as List<node>) of all terminals.
This class implements the minimum Steiner tree 2-approximation algorithm by Takahashi and Matsuyama w...
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
This class represents a triple used by various contraction-based minimum Steiner tree approximations.
NodeElement * node
The type of nodes.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
node buildHeaviestEdgeInComponentTree(const EdgeWeightedGraphCopy< T > &inputTree, NodeArray< node > &externalNodes, NodeArray< edge > &treeEdge, Graph &outputTree)
Given an edge-weighted tree, builds an auxiliary arborescence where each arc of the input tree is a n...
void contractTripleInSteinerTree(const Triple< T > &t, EdgeWeightedGraphCopy< T > &st, edge save0, edge save1, edge save2, edge &ne0, edge &ne1)
Updates the Steiner tree by deleting save edges, removing all direct connections between the terminal...
T obtainFinalSteinerTree(const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, const NodeArray< bool > &isOriginalTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree)
The namespace for all OGDF objects.