41namespace steiner_tree {
120#ifdef OGDF_SAVEDYNAMIC_CHANGE_TST
149#ifdef OGDF_SAVEDYNAMIC_CHANGE_TST
185 edge e = adj->theEdge();
223#ifdef OGDF_SAVEDYNAMIC_CHANGE_TST
255#ifndef OGDF_SAVEDYNAMIC_CHANGE_TST
The Sparse Table Algorithm for the Least Common Ancestor problem as proposed by Bender and Farach-Col...
Interface for various LCA methods.
Definition of a Triple used in contraction-based approximation algorithm for the minimum Steiner tree...
Class for adjacency list elements.
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).
edge newEdge(node v, node w)
Creates a new edge (v,w) and returns it.
virtual void delNode(node v)
Removes node v and all incident edges from the graph.
virtual void delEdge(edge e)
Removes edge e from the graph.
node newNode()
Creates a new node and returns it.
Implements the <O(n log n), O(1)>-time "sparse table" algorithm by Bender and Farach-Colton to comput...
int level(node v) const
Returns the level of a node. The level of the root is 0.
node call(node u, node v) const
Returns the LCA of two nodes u and v.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Dynamically updatable weighted Tree for determining save edges via LCA computation.
Graph m_tree
The weighted binary tree to represent the edge weight hierarchy.
node lca(node u, node v) const
Returns the node in m_tree that is the LCA of two nodes.
virtual T saveWeight(node u, node v) const
Determines the weight of the save edge between two nodes by a LCA query.
virtual T gain(node u, node v, node w) const
Returns the gain (sum of save edge costs) of the given triple, calculated by an LCA query.
virtual void update(const Triple< T > &t)
Updates the weighted tree data structure given a contracted triple.
NodeArray< node > m_cTerminals
Connects terminal nodes in the terminal spanning tree to their leafs in the weighted tree.
node m_root
The root node of the weighted binary tree.
SaveDynamic(EdgeWeightedGraphCopy< T > &steinerTree)
Builds a weighted binary tree based on the given terminal spanning tree.
T weight(node v) const
Returns the associated weight of a node v in m_tree, or 0 if it is not associated.
T weight(edge e) const
Returns the weight of an edge in the terminal tree or 0.
LCA * m_lca
Data structure for calculating the LCAs.
virtual edge saveEdge(node u, node v) const
Determines the save edge between two nodes by a LCA query.
const EdgeWeightedGraphCopy< T > * m_steinerTree
The underlying terminal spanning tree this weighted tree instance represents.
NodeArray< edge > m_treeEdge
Maps each inner node of m_tree to an edge in m_steinerTree.
This class serves as an interface for different approaches concerning the calculation of save edges.
This class represents a triple used by various contraction-based minimum Steiner tree approximations.
Algorithms used by at least two functions of Steiner tree code or its internal helpers.
#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...
The namespace for all OGDF objects.