#include <ogdf/graphalg/MinSteinerTreeRZLoss.h>
Public Member Functions | |
| Main (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, int restricted) | |
| T | getApproximation (EdgeWeightedGraphCopy< T > *&finalSteinerTree) const |
| long | numberOfComponentLookUps () |
| Returns the number of components lookups during execution time. | |
| long | numberOfContractedComponents () |
| Returns the number of contracted components. | |
| long | numberOfGeneratedComponents () |
| Returns the number of generated components. | |
Private Types | |
| template<typename TYPE > | |
| using | SaveStatic = steiner_tree::SaveStatic< TYPE > |
Private Member Functions | |
| void | contractLoss (EdgeWeightedGraphCopy< T > &steinerTree, int compId) |
| Contracts the loss of a full component and integrates it into the given terminal-spanning tree. | |
| double | extractMaxComponent (const EdgeWeightedGraphCopy< T > &steinerTree, int &maxCompId) |
| Traverses over all full components and finds the one with the highest win-objective. | |
| template<typename TERMINAL_CONTAINER > | |
| T | gain (const TERMINAL_CONTAINER &terminals, const EdgeWeightedGraphCopy< T > &steinerTree) |
| void | generateInitialTerminalSpanningTree (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< NodeArray< T > > &distance, const NodeArray< NodeArray< edge > > &pred) |
| Builds a minimum terminal spanning tree (via a MST call on the complete terminal graph) | |
| void | multiPass (EdgeWeightedGraphCopy< T > &steinerTree) |
| Contraction phase of the algorithm. | |
| void | setup (EdgeWeightedGraphCopy< T > &tree) |
| Setup (build initial terminal-spanning tree, its save data structure, and find all components) | |
Finding full components | |
| void | findFullComponentsDW (const EdgeWeightedGraphCopy< T > &tree, const NodeArray< NodeArray< T > > &distance, const NodeArray< NodeArray< edge > > &pred) |
| Find full components using algorithm by Dreyfus-Wagner. | |
| void | findFullComponentsEMV (const EdgeWeightedGraphCopy< T > &tree) |
| Find full components using algorithm by Erickson et al. | |
| void | findFull3Components (const EdgeWeightedGraphCopy< T > &tree, const NodeArray< NodeArray< T > > &distance, const NodeArray< NodeArray< edge > > &pred) |
| Find full components of size 3. | |
| template<typename FCG > | |
| void | retrieveComponents (const FCG &fcg, const EdgeWeightedGraphCopy< T > &tree) |
| Auxiliary function to retrieve components by Dreyfus-Wagner/Erickson et al implementation. | |
Private Attributes | |
| long | m_componentsContracted |
| Number of contracted components. | |
| long | m_componentsGenerated |
| Number of generated components. | |
| long | m_componentsLookUps |
| Number of components lookups. | |
| steiner_tree::FullComponentWithLossStore< T > | m_fullCompStore |
| All generated full components. | |
| const EdgeWeightedGraph< T > & | m_G |
| The original edge-weighted graph. | |
| NodeArray< bool > | m_isNewTerminal |
| Incidence vector for nonterminal nodes marked as terminals for improvement. | |
| const NodeArray< bool > & | m_isTerminal |
| Incidence vector for terminal nodes. | |
| int | m_restricted |
| Parameter for the number of terminals in a full component. | |
| std::unique_ptr< steiner_tree::SaveStatic< T > > | m_save |
| The save data structure. | |
| List< node > | m_terminals |
| List of terminal nodes (will be copied and sorted) | |
Definition at line 140 of file MinSteinerTreeRZLoss.h.
|
private |
Definition at line 142 of file MinSteinerTreeRZLoss.h.
| ogdf::MinSteinerTreeRZLoss< T >::Main::Main | ( | const EdgeWeightedGraph< T > & | G, |
| const List< node > & | terminals, | ||
| const NodeArray< bool > & | isTerminal, | ||
| int | restricted | ||
| ) |
Definition at line 269 of file MinSteinerTreeRZLoss.h.
|
private |
Contracts the loss of a full component and integrates it into the given terminal-spanning tree.
| steinerTree | The Steiner tree into which the full component is integrated |
| compId | The full component to be contracted and inserted |
Definition at line 460 of file MinSteinerTreeRZLoss.h.
|
private |
Traverses over all full components and finds the one with the highest win-objective.
| steinerTree | Current Steiner tree |
| maxCompId | The index of the full component with highest win-objective |
Definition at line 410 of file MinSteinerTreeRZLoss.h.
|
private |
Find full components of size 3.
Definition at line 323 of file MinSteinerTreeRZLoss.h.
|
private |
Find full components using algorithm by Dreyfus-Wagner.
| tree | Current minimal terminal spanning tree |
| distance | The distance matrix |
| pred | The predecessor matrix for shortest paths |
Definition at line 370 of file MinSteinerTreeRZLoss.h.
|
private |
Find full components using algorithm by Erickson et al.
Definition at line 379 of file MinSteinerTreeRZLoss.h.
|
private |
\brief Calculates the gain for a full component
| terminals | The terminals of the full component |
| steinerTree | Current Steiner tree |
Definition at line 438 of file MinSteinerTreeRZLoss.h.
|
private |
Builds a minimum terminal spanning tree (via a MST call on the complete terminal graph)
| steinerTree | The resulting minimum terminal spanning tree |
| distance | The distance matrix |
| pred | The predecessor matrix for shortest paths |
Definition at line 299 of file MinSteinerTreeRZLoss.h.
|
inline |
Definition at line 252 of file MinSteinerTreeRZLoss.h.
|
private |
Contraction phase of the algorithm.
| steinerTree | the terminal-spanning tree to be modified |
Definition at line 387 of file MinSteinerTreeRZLoss.h.
|
inline |
Returns the number of components lookups during execution time.
Definition at line 265 of file MinSteinerTreeRZLoss.h.
|
inline |
Returns the number of contracted components.
Definition at line 262 of file MinSteinerTreeRZLoss.h.
|
inline |
Returns the number of generated components.
Definition at line 259 of file MinSteinerTreeRZLoss.h.
|
private |
Auxiliary function to retrieve components by Dreyfus-Wagner/Erickson et al implementation.
Definition at line 348 of file MinSteinerTreeRZLoss.h.
|
inlineprivate |
Setup (build initial terminal-spanning tree, its save data structure, and find all components)
Definition at line 176 of file MinSteinerTreeRZLoss.h.
|
private |
Number of contracted components.
Definition at line 245 of file MinSteinerTreeRZLoss.h.
|
private |
Number of generated components.
Definition at line 244 of file MinSteinerTreeRZLoss.h.
|
private |
Number of components lookups.
Definition at line 246 of file MinSteinerTreeRZLoss.h.
|
private |
All generated full components.
Definition at line 241 of file MinSteinerTreeRZLoss.h.
|
private |
The original edge-weighted graph.
Definition at line 236 of file MinSteinerTreeRZLoss.h.
|
private |
Incidence vector for nonterminal nodes marked as terminals for improvement.
Definition at line 242 of file MinSteinerTreeRZLoss.h.
|
private |
Incidence vector for terminal nodes.
Definition at line 237 of file MinSteinerTreeRZLoss.h.
|
private |
Parameter for the number of terminals in a full component.
Definition at line 239 of file MinSteinerTreeRZLoss.h.
|
private |
The save data structure.
Definition at line 240 of file MinSteinerTreeRZLoss.h.
|
private |
List of terminal nodes (will be copied and sorted)
Definition at line 238 of file MinSteinerTreeRZLoss.h.