42 namespace steiner_tree {
57 ,
m_save(0, steinerTree.maxNodeIndex(), 0, steinerTree.maxNodeIndex())
108 if (uvSave == vwSave) {
205 for (
node f : processedNodes1) {
206 for (
node g : processedNodes2) {
207 m_save(f->index(), g->index()) = maxE;
208 m_save(g->index(), f->index()) = maxE;
node target() const
Returns the target node of the edge.
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 build()
Build the lookup table.
Declaration and implementation of HashArray class.
The parameterized class Queue<E> implements list-based queues.
edge theEdge() const
Returns the edge associated with this adjacency entry.
iterator append(const E &x)
Adds x at the end of queue.
iterator pushBack(const E &x)
Adds element x at the end of the list.
SaveEnum(EdgeWeightedGraphCopy< T > &steinerTree)
Initializes the data structures and calculates a MST of the given complete terminal graph...
virtual void update(const Triple< T > &t)
Updates the weighted tree data structure given a contracted triple.
void buildRecursively(EdgeArray< bool > &hidden, node u, List< node > &processedNodes)
Builds the lookup table for the save edges recursively.
virtual edge saveEdge(node u, node v) const
Determines the save edge between two nodes by a table lookup.
Doubly linked lists (maintaining the length of the list).
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
virtual T saveWeight(node u, node v) const
Determines the weight of the save edge between two nodes by a table lookup.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
Class for the representation of edges.
The parameterized class Array2D implements dynamic two-dimensional arrays.
bool empty() const
Returns true iff the queue is empty.
Class for the representation of nodes.
Definition of a Triple used in contraction-based approximation algorithm for the minimum Steiner tree...
This class computes save edges recursively and stores for every node pair their save edge in a HashAr...
void rebuild()
Rebuild the lookup table (necessary if the tree has changed)
Interface for various LCA methods.
Array2D< edge > m_save
Data structure for the lookup table.
node source() const
Returns the source node of the edge.
Algorithms used by at least two functions of Steiner tree code or its internal helpers.
The namespace for all OGDF objects.
EdgeWeightedGraphCopy< T > * m_steinerTree
The current terminal spanning tree.
E pop()
Removes front element and returns it.
This class serves as an interface for different approaches concerning the calculation of save edges...
Class for adjacency list elements.
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.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.