This class serves as an interface for various methods to compute minimum or approximations of minimum Steiner trees. More...
#include <ogdf/module/MinSteinerTreeModule.h>
Inheritance diagram for ogdf::MinSteinerTreeModule< T >:Public Member Functions | |
| 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... | |
Static Public Member Functions | |
| 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) |
Protected Member Functions | |
| virtual T | computeSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree)=0 |
This class serves as an interface for various methods to compute minimum or approximations of minimum Steiner trees.
Furthermore it supplies some helping methods.
Definition at line 54 of file MinSteinerTreeModule.h.
|
inline |
Definition at line 56 of file MinSteinerTreeModule.h.
|
inlinevirtual |
Definition at line 58 of file MinSteinerTreeModule.h.
|
static |
Undirected All-pair-shortest-paths (Floyd-Warshall) over non-terminal nodes of G.
| G | The graph |
| nonterminals | List of non-terminals (APSP is only computed over non-terminal nodes) |
| distance | The distance matrix result |
| pred | The resulting shortest-path last edge of a path |
Definition at line 443 of file MinSteinerTreeModule.h.
|
static |
Definition at line 529 of file MinSteinerTreeModule.h.
|
static |
Definition at line 478 of file MinSteinerTreeModule.h.
|
virtual |
Builds a minimum Steiner tree given a weighted graph and a list of terminals.
| G | The weighted input graph |
| terminals | The list of terminal nodes |
| isTerminal | A bool array of terminals |
| finalSteinerTree | The final Steiner tree |
Reimplemented in ogdf::MinSteinerTreePrimalDual< T >, ogdf::MinSteinerTreeZelikovsky< T >, and ogdf::MinSteinerTreeRZLoss< T >.
Definition at line 165 of file MinSteinerTreeModule.h.
|
protectedpure virtual |
Implemented in ogdf::MinSteinerTreeZelikovsky< T >, ogdf::MinSteinerTreeDirectedCut< T >, ogdf::MinSteinerTreeGoemans139< T >, ogdf::MinSteinerTreeDualAscent< T >, ogdf::MinSteinerTreePrimalDual< T >, ogdf::MinSteinerTreeRZLoss< T >, ogdf::MinSteinerTreeTakahashi< T >, ogdf::MinSteinerTreeShore< T >, ogdf::MinSteinerTreeMehlhorn< T >, and ogdf::MinSteinerTreeKou< T >.
|
static |
Writes a SVG that shows only the given Steiner tree.
| steinerTree | The Steiner tree to be drawn |
| isTerminal | Incidence vector indicating terminal nodes |
| filename | The name of the output file |
Definition at line 564 of file MinSteinerTreeModule.h.
|
static |
Writes an SVG file of a minimum Steiner tree in the original graph.
| G | The original weighted graph |
| isTerminal | Incidence vector indicating terminal nodes |
| steinerTree | The Steiner tree of the given graph |
| filename | The name of the output file |
Definition at line 607 of file MinSteinerTreeModule.h.
|
static |
Checks in O(n + m) time if a given Steiner tree problem instance is quasi-bipartite.
| G | The original graph |
| isTerminal | A bool array of terminals |
Definition at line 234 of file MinSteinerTreeModule.h.
|
static |
Checks in O(n) time if a given tree is acually a Steiner Tree.
| G | The original graph |
| terminals | The list of terminal nodes |
| isTerminal | A bool array of terminals |
| steinerTree | The Steiner tree to be checked |
Definition at line 203 of file MinSteinerTreeModule.h.
|
static |
Prune Steiner nodes with degree 1 and their paths to terminal or branching nodes.
| steinerTree | The given Steiner tree |
| isTerminal | Incidence vector indicating terminal nodes |
Definition at line 276 of file MinSteinerTreeModule.h.
|
static |
Prune the dangling Steiner path beginning at a given node only.
Definition at line 249 of file MinSteinerTreeModule.h.
|
static |
Prune dangling Steiner paths beginning at given nodes only.
Definition at line 266 of file MinSteinerTreeModule.h.
|
static |
Remove remaining cycles from an Steiner "almost" tree.
Definition at line 290 of file MinSteinerTreeModule.h.
|
static |
Undirected Single-source-shortest-paths (Dijkstra) over non-terminal nodes of G.
| G | The graph |
| source | The start terminal |
| isTerminal | Incidence vector indicating terminal nodes |
| distance | The distance matrix result |
| pred | The resulting shortest-path last edge of a path |
Definition at line 318 of file MinSteinerTreeModule.h.
|
static |
Definition at line 409 of file MinSteinerTreeModule.h.
|
static |
Definition at line 352 of file MinSteinerTreeModule.h.