Dual ascent approximation algorithm for Steiner tree problems. More...
#include <ogdf/graphalg/MinSteinerTreeDualAscent.h>
Inheritance diagram for ogdf::MinSteinerTreeDualAscent< T >:Protected Member Functions | |
| T | computeSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree) |
| Creates a minimum Steiner tree given a weighted graph and a list of terminals. More... | |
Private Member Functions | |
| List< edge > * | computeCutSet (const node v) const |
| Returns all incoming cut edges of the component of v. More... | |
| int | findActiveComponent (node *terminal) const |
| Searches for the next active component. More... | |
| int | findComponent (const node v) const |
| Returns the component of node v. More... | |
| void | init () |
| Intializes all relevant variables. More... | |
| bool | isActiveComponent (const node v) const |
| Determines whether a strongly connected component is active (paper says "is root component"). More... | |
| bool | isTerminal (const node v, bool rootIsTerminal) const |
| Returns whether this node is a terminal. More... | |
| void | updateComponents () |
| Re-establishes all strongly connected components for the Steiner graph. More... | |
Private Attributes | |
| NodeArray< int > | m_componentMapping |
| GraphCopy | m_diGraph |
| EdgeArray< bool > | m_edgeInclusions |
| EdgeArray< T > | m_edgeSlacks |
| EdgeArray< edge > | m_origMapping |
| const NodeArray< bool > * | m_pIsTerminal |
| const EdgeWeightedGraph< T > * | m_pOrigGraph |
| const List< node > * | m_pTerminals |
| node | m_rootTerminal |
| GraphCopy | m_steinerGraph |
| const T | MAX_VALUE = std::numeric_limits<T>::max() |
Additional Inherited Members | |
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... | |
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) |
Dual ascent approximation algorithm for Steiner tree problems.
The algorithm is implemented following the paper by Richard T. DualAscent, "A Dual Ascent Approach for Steiner Tree Problems on a Directed Graph", Mathematical Programming 28, pages 271-287, 1984.
Definition at line 53 of file MinSteinerTreeDualAscent.h.
|
private |
Returns all incoming cut edges of the component of v.
| v | representative of the component |
Definition at line 263 of file MinSteinerTreeDualAscent.h.
|
protectedvirtual |
Creates 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 |
Implements ogdf::MinSteinerTreeModule< T >.
Definition at line 351 of file MinSteinerTreeDualAscent.h.
|
private |
Searches for the next active component.
| terminal | Will hold an arbitrary terminal of the returned component. |
Definition at line 225 of file MinSteinerTreeDualAscent.h.
|
private |
Returns the component of node v.
| v | the node of the component |
Definition at line 202 of file MinSteinerTreeDualAscent.h.
|
private |
Intializes all relevant variables.
Creates the respectiv graph copies.
Definition at line 156 of file MinSteinerTreeDualAscent.h.
|
private |
Determines whether a strongly connected component is active (paper says "is root component").
A component is active if and only if it has no dangling terminal node and includes at least one component.
| v | representative of the component |
Definition at line 307 of file MinSteinerTreeDualAscent.h.
|
private |
Returns whether this node is a terminal.
If v is the root terminal, the second parameter will be returned.
| v | the node to be tested |
| rootIsTerminal | whether the root terminal should be considered as terminal |
Definition at line 217 of file MinSteinerTreeDualAscent.h.
|
private |
Re-establishes all strongly connected components for the Steiner graph.
Definition at line 211 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 72 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 62 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 66 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 67 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 64 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 60 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 58 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 59 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 69 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 63 of file MinSteinerTreeDualAscent.h.
|
private |
Definition at line 55 of file MinSteinerTreeDualAscent.h.