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. | |
node | lca (node u, node v) const |
Returns the node corresponding to the LCA between two given nodes. | |
void | rebuild () |
Rebuild the data structure (necessary if the tree has changed) | |
virtual edge | saveEdge (node u, node v) const |
Determines the save edge between two nodes by a LCA query. | |
virtual T | saveWeight (node u, node v) const |
Determines the weight of the save edge between two nodes by a LCA query. | |
virtual void | update (const Triple< T > &t) |
Updates the weighted tree data structure given a contracted triple. | |
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. | |
node | m_root |
The root of m_tree. | |
EdgeWeightedGraphCopy< T > * | m_steinerTree |
A pointer to the tree we represent the save for. | |
Graph | m_tree |
The weighted binary tree to represent the edge weight hierarchy. | |
NodeArray< edge > | m_treeEdge |
Maps each inner node of m_tree to an edge in m_steinerTree. | |
This class behaves basically the same as SaveDynamic except that the update of the weighted graph is not done dynamically here.
Definition at line 48 of file SaveStatic.h.
|
inlineexplicit |
Definition at line 50 of file SaveStatic.h.
|
inlinevirtual |
Definition at line 60 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 91 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 135 of file SaveStatic.h.
|
inline |
Rebuild the data structure (necessary if the tree has changed)
Definition at line 104 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 76 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 68 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 120 of file SaveStatic.h.
|
private |
Definition at line 144 of file SaveStatic.h.
|
private |
The LCA data structure for m_tree.
Definition at line 143 of file SaveStatic.h.
|
private |
The root of m_tree.
Definition at line 142 of file SaveStatic.h.
|
private |
A pointer to the tree we represent the save for.
Definition at line 141 of file SaveStatic.h.
|
private |
The weighted binary tree to represent the edge weight hierarchy.
Definition at line 139 of file SaveStatic.h.
|
private |
Maps each inner node of m_tree to an edge in m_steinerTree.
Definition at line 140 of file SaveStatic.h.