Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Save.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37namespace steiner_tree {
38
39template<typename T>
40
45class Save {
46public:
47 Save() { }
48
49 virtual ~Save() { }
50
58 virtual T gain(node u, node v, node w) const = 0;
59
66 virtual T saveWeight(node u, node v) const = 0;
67
74 virtual edge saveEdge(node u, node v) const = 0;
75
80 virtual void update(const Triple<T>& t) = 0;
81};
82
83}
84}
Definition of a Triple used in contraction-based approximation algorithm for the minimum Steiner tree...
Class for the representation of edges.
Definition Graph_d.h:300
Class for the representation of nodes.
Definition Graph_d.h:177
This class serves as an interface for different approaches concerning the calculation of save edges.
Definition Save.h:45
virtual T gain(node u, node v, node w) const =0
Returns the gain (sum of the save edges) of a node triple.
virtual void update(const Triple< T > &t)=0
Updates the weighted tree data structure given a contracted triple.
virtual edge saveEdge(node u, node v) const =0
Returns the save edge between two nodes.
virtual T saveWeight(node u, node v) const =0
Returns the weight of the save edge between two nodes.
This class represents a triple used by various contraction-based minimum Steiner tree approximations.
Definition Triple.h:44
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.