This class implements the (1.39+epsilon)-approximation algorithm for the Steiner tree problem by Goemans et. More...
#include <ogdf/graphalg/MinSteinerTreeGoemans139.h>
Inheritance diagram for ogdf::MinSteinerTreeGoemans139< T >:Classes | |
| class | UFCR |
| Class managing LP and LP-based approximation. More... | |
Public Member Functions | |
| MinSteinerTreeGoemans139 () | |
| virtual | ~MinSteinerTreeGoemans139 () |
| void | forceAPSP (bool force=true) |
| Force full APSP algorithm even if consecutive SSSP algorithms may work. More... | |
| void | separateCycles (bool separateCycles=true) |
| Use stronger LP relaxation (not recommended in general) More... | |
| void | setMaxComponentSize (int k) |
| Sets the maximal number of terminals in a full component. More... | |
| void | setSeed (int seed) |
| Set seed for the random number generation. More... | |
| void | use2Approximation (bool use2approx=true) |
| Use Takahashi-Matsuyama 2-approximation as upper bounds. More... | |
Public Member Functions inherited from ogdf::MinSteinerTreeModule< T > | |
| MinSteinerTreeModule () | |
| virtual | ~MinSteinerTreeModule () |
| virtual T | call (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree) |
| Builds a minimum Steiner tree given a weighted graph and a list of terminals. More... | |
Protected Member Functions | |
| virtual T | computeSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree) override |
| Builds a minimum Steiner tree for a given weighted graph with terminals. More... | |
Protected Attributes | |
| bool | m_forceAPSP |
| int | m_restricted |
| int | m_seed |
| bool | m_separateCycles |
| bool | m_use2approx |
Additional Inherited Members | |
Static Public Member Functions inherited from ogdf::MinSteinerTreeModule< T > | |
| static void | allPairShortestPaths (const EdgeWeightedGraph< T > &G, const List< node > &nonterminals, NodeArray< NodeArray< T > > &distance, NodeArray< NodeArray< edge > > &pred) |
| Undirected All-pair-shortest-paths (Floyd-Warshall) over non-terminal nodes of G. More... | |
| static void | allPairShortestPathsDetour (const EdgeWeightedGraph< T > &G, const List< node > &nonterminals, NodeArray< NodeArray< T > > &distance, NodeArray< NodeArray< edge > > &pred) |
| static void | allPairShortestPathsStrict (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T > > &distance, NodeArray< NodeArray< edge > > &pred) |
| static void | drawSteinerTreeSVG (const EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, const char *filename) |
| Writes a SVG that shows only the given Steiner tree. More... | |
| static void | drawSVG (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, const EdgeWeightedGraphCopy< T > &steinerTree, const char *filename) |
| Writes an SVG file of a minimum Steiner tree in the original graph. More... | |
| static bool | isQuasiBipartite (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal) |
| Checks in O(n + m) time if a given Steiner tree problem instance is quasi-bipartite. More... | |
| static bool | isSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, const EdgeWeightedGraphCopy< T > &steinerTree) |
| Checks in O(n) time if a given tree is acually a Steiner Tree. More... | |
| static T | pruneAllDanglingSteinerPaths (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal) |
| Prune Steiner nodes with degree 1 and their paths to terminal or branching nodes. More... | |
| static T | pruneDanglingSteinerPathFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, node start) |
| Prune the dangling Steiner path beginning at a given node only. More... | |
| static T | pruneDanglingSteinerPathsFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, const List< node > &start) |
| Prune dangling Steiner paths beginning at given nodes only. More... | |
| static T | removeCyclesFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal) |
| Remove remaining cycles from an Steiner "almost" tree. More... | |
| static void | singleSourceShortestPaths (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &isTerminal, NodeArray< T > &distance, NodeArray< edge > &pred) |
| Undirected Single-source-shortest-paths (Dijkstra) over non-terminal nodes of G. More... | |
| static void | singleSourceShortestPathsDetour (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &isTerminal, NodeArray< T > &distance, NodeArray< edge > &pred) |
| static void | singleSourceShortestPathsStrict (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &isTerminal, NodeArray< T > &distance, NodeArray< edge > &pred) |
This class implements the (1.39+epsilon)-approximation algorithm for the Steiner tree problem by Goemans et.
al.
This implementation is based on:
M.X. Goemans, N. Olver, T. Rothvoß, R. Zenklusen: Matroids and Integrality Gaps for Hypergraphic Steiner Tree Relaxations. STOC 2012, pages 1161-1176, 2012
and
S. Beyer, M. Chimani: Steiner Tree 1.39-Approximation in Practice. MEMICS 2014, LNCS 8934, 60-72, Springer, 2014
Definition at line 71 of file MinSteinerTreeGoemans139.h.
|
inline |
Definition at line 84 of file MinSteinerTreeGoemans139.h.
|
inlinevirtual |
Definition at line 93 of file MinSteinerTreeGoemans139.h.
|
overrideprotectedvirtual |
Builds a minimum Steiner tree for a given weighted graph with terminals.
| G | The weighted input graph |
| terminals | The list of terminal nodes |
| isTerminal | A bool array of terminals |
| finalSteinerTree | The final Steiner tree |
Implements ogdf::MinSteinerTreeModule< T >.
Definition at line 1981 of file MinSteinerTreeGoemans139.h.
|
inline |
Force full APSP algorithm even if consecutive SSSP algorithms may work.
For the 3-restricted case, it is sufficient to compute an SSSP from every terminal instead of doing a full APSP. In case a full APSP is faster, use this method.
| force | True to force APSP instead of SSSP. |
Definition at line 129 of file MinSteinerTreeGoemans139.h.
|
inline |
Use stronger LP relaxation (not recommended in general)
| separateCycles | True to turn the stronger LP relaxation on |
Definition at line 138 of file MinSteinerTreeGoemans139.h.
|
inline |
Sets the maximal number of terminals in a full component.
| k | the maximal number of terminals in a full component |
Definition at line 99 of file MinSteinerTreeGoemans139.h.
|
inline |
Set seed for the random number generation.
| seed | The seed |
Definition at line 108 of file MinSteinerTreeGoemans139.h.
|
inline |
Use Takahashi-Matsuyama 2-approximation as upper bounds.
| use2approx | True to apply the bound |
Definition at line 118 of file MinSteinerTreeGoemans139.h.
|
protected |
Definition at line 79 of file MinSteinerTreeGoemans139.h.
|
protected |
Definition at line 74 of file MinSteinerTreeGoemans139.h.
|
protected |
Definition at line 81 of file MinSteinerTreeGoemans139.h.
|
protected |
Definition at line 80 of file MinSteinerTreeGoemans139.h.
|
protected |
Definition at line 78 of file MinSteinerTreeGoemans139.h.