This class behaves basically the same as SaveDynamic except that the update of the weighted graph is not done dynamically here. More...
#include <ogdf/graphalg/steiner_tree/SaveStatic.h>
Public Member Functions | |
SaveStatic (EdgeWeightedGraphCopy< T > &steinerTree) | |
virtual | ~SaveStatic () |
virtual T | gain (node u, node v, node w) const |
Returns the gain (sum of the save edges) of a node triple by an LCA query. More... | |
node | lca (node u, node v) const |
Returns the node corresponding to the LCA between two given nodes. More... | |
void | rebuild () |
Rebuild the data structure (necessary if the tree has changed) More... | |
virtual edge | saveEdge (node u, node v) const |
Determines the save edge between two nodes by a LCA query. More... | |
virtual T | saveWeight (node u, node v) const |
Determines the weight of the save edge between two nodes by a LCA query. More... | |
virtual void | update (const Triple< T > &t) |
Updates the weighted tree data structure given a contracted triple. More... | |
Public Member Functions inherited from ogdf::steiner_tree::Save< T > | |
Save () | |
virtual | ~Save () |
Private Attributes | |
NodeArray< node > | m_cTerminals |
LCA * | m_lca |
The LCA data structure for m_tree. More... | |
node | m_root |
The root of m_tree. More... | |
EdgeWeightedGraphCopy< T > * | m_steinerTree |
A pointer to the tree we represent the save for. More... | |
Graph | m_tree |
The weighted binary tree to represent the edge weight hierarchy. More... | |
NodeArray< edge > | m_treeEdge |
Maps each inner node of m_tree to an edge in m_steinerTree. More... | |
This class behaves basically the same as SaveDynamic except that the update of the weighted graph is not done dynamically here.
Definition at line 57 of file SaveStatic.h.
|
inlineexplicit |
Definition at line 59 of file SaveStatic.h.
|
inlinevirtual |
Definition at line 69 of file SaveStatic.h.
|
inlinevirtual |
Returns the gain (sum of the save edges) of a node triple by an LCA query.
u | First triple node |
v | Second triple node |
w | Third triple node |
Implements ogdf::steiner_tree::Save< T >.
Definition at line 100 of file SaveStatic.h.
|
inline |
Returns the node corresponding to the LCA between two given nodes.
u | First node |
v | Second node |
Definition at line 144 of file SaveStatic.h.
|
inline |
Rebuild the data structure (necessary if the tree has changed)
Definition at line 113 of file SaveStatic.h.
|
inlinevirtual |
Determines the save edge between two nodes by a LCA query.
u | First node |
v | First node |
Implements ogdf::steiner_tree::Save< T >.
Definition at line 85 of file SaveStatic.h.
|
inlinevirtual |
Determines the weight of the save edge between two nodes by a LCA query.
u | First node |
v | First node |
Implements ogdf::steiner_tree::Save< T >.
Definition at line 77 of file SaveStatic.h.
|
inlinevirtual |
Updates the weighted tree data structure given a contracted triple.
The update first identifies the save edges and removes them. After removing links between the triple terminals and replacing them with 0-cost edges a new weighted tree is created and the LCA data structure is rebuilt as well.
t | The contracted triple |
Implements ogdf::steiner_tree::Save< T >.
Definition at line 129 of file SaveStatic.h.
|
private |
Definition at line 153 of file SaveStatic.h.
|
private |
The LCA data structure for m_tree.
Definition at line 152 of file SaveStatic.h.
|
private |
The root of m_tree.
Definition at line 151 of file SaveStatic.h.
|
private |
A pointer to the tree we represent the save for.
Definition at line 150 of file SaveStatic.h.
|
private |
The weighted binary tree to represent the edge weight hierarchy.
Definition at line 148 of file SaveStatic.h.
|
private |
Maps each inner node of m_tree to an edge in m_steinerTree.
Definition at line 149 of file SaveStatic.h.