|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
51 class EdgeWeightedGraphCopy;
53 namespace steiner_tree {
67 ,
m_save(0, steinerTree.maxNodeIndex(), 0, steinerTree.maxNodeIndex())
113 if (uvSave == vwSave) {
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;
The namespace for all OGDF objects.
iterator append(const E &x)
Adds x at the end of queue.
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 table lookup.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
The parameterized class Array2D implements dynamic two-dimensional arrays.
This class serves as an interface for different approaches concerning the calculation of save edges.
void build()
Build the lookup table.
Class for adjacency list elements.
edge theEdge() const
Returns the edge associated with this adjacency entry.
This class computes save edges recursively and stores for every node pair their save edge in a HashAr...
Algorithms used by at least two functions of Steiner tree code or its internal helpers.
void rebuild()
Rebuild the lookup table (necessary if the tree has changed)
virtual T saveWeight(node u, node v) const
Determines the weight of the save edge between two nodes by a table lookup.
E pop()
Removes front element and returns it.
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.
Decralation of GraphElement and GraphList classes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
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.
node source() const
Returns the source node of the edge.
EdgeWeightedGraphCopy< T > * m_steinerTree
The current terminal spanning tree.
Array2D< edge > m_save
Data structure for the lookup table.
Doubly linked lists (maintaining the length of the list).
RegisteredArray for nodes, edges and adjEntries of a graph.
The parameterized class Queue<E> implements list-based queues.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
bool empty() const
Returns true iff the queue is empty.
Basic declarations, included by all source files.
void buildRecursively(EdgeArray< bool > &hidden, node u, List< node > &processedNodes)
Builds the lookup table for the save edges recursively.
Class for the representation of edges.
Declaration of doubly linked lists and iterators.
Interface for various LCA methods.
node target() const
Returns the target node of the edge.
Declaration and implementation of class Array2D which implements dynamic two dimensional arrays.
Class for the representation of nodes.
iterator pushBack(const E &x)
Adds element x at the end of the list.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.