|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
48 class EdgeWeightedGraphCopy;
50 namespace steiner_tree {
103 if (save0 == save1) {
The namespace for all OGDF objects.
Includes declaration of graph class.
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...
This class represents a triple used by various contraction-based minimum Steiner tree approximations.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
virtual edge saveEdge(node u, node v) const
Determines the save edge between two nodes by a LCA query.
virtual T saveWeight(node u, node v) const
Determines the weight of the save edge between two nodes by a LCA query.
SaveStatic(EdgeWeightedGraphCopy< T > &steinerTree)
void rebuild()
Rebuild the data structure (necessary if the tree has changed)
LCA * m_lca
The LCA data structure for m_tree.
node call(node u, node v) const
Returns the LCA of two nodes u and v.
This class serves as an interface for different approaches concerning the calculation of save edges.
virtual T gain(node u, node v, node w) const
Returns the gain (sum of the save edges) of a node triple by an LCA query.
virtual void update(const Triple< T > &t)
Updates the weighted tree data structure given a contracted triple.
node lca(node u, node v) const
Returns the node corresponding to the LCA between two given nodes.
The Sparse Table Algorithm for the Least Common Ancestor problem as proposed by Bender and Farach-Col...
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...
virtual void clear()
Removes all nodes and all edges from the graph.
Algorithms used by at least two functions of Steiner tree code or its internal helpers.
NodeArray< node > m_cTerminals
EdgeWeightedGraphCopy< T > * m_steinerTree
A pointer to the tree we represent the save for.
RegisteredArray for nodes, edges and adjEntries of a graph.
Implements the <O(n log n), O(1)>-time "sparse table" algorithm by Bender and Farach-Colton to comput...
Data type for general directed graphs (adjacency list representation).
node m_root
The root of m_tree.
Graph m_tree
The weighted binary tree to represent the edge weight hierarchy.
Basic declarations, included by all source files.
NodeArray< edge > m_treeEdge
Maps each inner node of m_tree to an edge in m_steinerTree.
Class for the representation of edges.
Interface for various LCA methods.
Class for the representation of nodes.
This class behaves basically the same as SaveDynamic except that the update of the weighted graph is ...