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