45namespace steiner_tree {
61 isInTree.
init(graph,
false);
64 int contractedID = uf.
makeSet();
66 for (
node t : terminals) {
67 setID[t] = contractedID;
78 edgePermutation.
push(e);
83 for (
edge e : edgePermutation) {
84 const int v = setID[e->source()];
85 const int w = setID[e->target()];
Declaration and implementation of ArrayBuffer class.
Definition of ogdf::steiner_tree::goemans::CoreEdgeModule class template.
Implementation of disjoint sets data structures (union-find functionality).
Includes declaration of graph class.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Basic declarations, included by all source files.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
void push(E e)
Puts a new element in the buffer.
void permute(INDEX l, INDEX r, RNG &rng)
Randomly permutes the subarray with index set [l..r] using random number generator rng.
A Union/Find data structure for maintaining disjoint sets.
int makeSet()
Initializes a singleton set.
int find(disjoint_sets::CompressionOption< CompressionOptions::PathCompression >, int set)
int link(disjoint_sets::LinkOption< LinkOptions::Naive >, int set1, int set2)
Class for the representation of edges.
Data type for general directed graphs (adjacency list representation).
int numberOfNodes() const
Returns the number of nodes in the graph.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Doubly linked lists (maintaining the length of the list).
int size() const
Returns the number of elements in the list.
Class for the representation of nodes.
void init(const Base *base=nullptr)
Reinitializes the array. Associates the array with the matching registry of base.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
Interface for core edge finder algorithms.
Computes a random set of core edges.
CoreEdgeRandomSpanningTree(std::minstd_rand &rng)
void call(const Graph &graph, const List< node > &terminals, EdgeArray< bool > &isInTree) const override
Compute a set of core edges.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.