51class EdgeWeightedGraphCopy;
53namespace steiner_tree {
67 ,
m_save(0, steinerTree.maxNodeIndex(), 0, steinerTree.maxNodeIndex())
113 if (uvSave == vwSave) {
181 const edge e = adj->theEdge();
183 const node w = adj->twinNode();
206 for (
node f : processedNodes1) {
207 for (
node g : processedNodes2) {
208 m_save(f->index(), g->index()) = maxE;
209 m_save(g->index(), f->index()) = maxE;
Declaration and implementation of class Array2D which implements dynamic two dimensional arrays.
Includes declaration of graph class.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Interface for various LCA methods.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
Basic declarations, included by all source files.
Class for adjacency list elements.
The parameterized class Array2D implements dynamic two-dimensional arrays.
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.
Doubly linked lists (maintaining the length of the list).
iterator pushBack(const E &x)
Adds element x at the end of the list.
Class for the representation of nodes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
The parameterized class Queue<E> implements list-based queues.
E pop()
Removes front element and returns it.
bool empty() const
Returns true iff the queue is empty.
iterator append(const E &x)
Adds x at the end of queue.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
This class computes save edges recursively and stores for every node pair their save edge in a HashAr...
SaveEnum(EdgeWeightedGraphCopy< T > &steinerTree)
Initializes the data structures and calculates a MST of the given complete terminal graph.
void build()
Build the lookup table.
void buildRecursively(EdgeArray< bool > &hidden, node u, List< node > &processedNodes)
Builds the lookup table for the save edges recursively.
Array2D< edge > m_save
Data structure for the lookup table.
EdgeWeightedGraphCopy< T > * m_steinerTree
The current terminal spanning tree.
virtual T gain(node u, node v, node w) const
Returns the gain (sum of the save edges) of a node triple by an table lookup.
void rebuild()
Rebuild the lookup table (necessary if the tree has changed)
virtual edge saveEdge(node u, node v) const
Determines the save edge between two nodes by a table lookup.
virtual void update(const Triple< T > &t)
Updates the weighted tree data structure given a contracted triple.
virtual T saveWeight(node u, node v) const
Determines the weight of the save edge between two nodes by a table lookup.
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.
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.