Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Save.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 
36 namespace ogdf::steiner_tree {
37 template<typename T>
38 class Triple;
39 } // namespace ogdf::steiner_tree
40 
41 namespace ogdf {
42 namespace steiner_tree {
43 
44 template<typename T>
45 
50 class Save {
51 public:
52  Save() { }
53 
54  virtual ~Save() { }
55 
63  virtual T gain(node u, node v, node w) const = 0;
64 
71  virtual T saveWeight(node u, node v) const = 0;
72 
79  virtual edge saveEdge(node u, node v) const = 0;
80 
85  virtual void update(const Triple<T>& t) = 0;
86 };
87 
88 }
89 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::steiner_tree::Save::~Save
virtual ~Save()
Definition: Save.h:54
Graph.h
Includes declaration of graph class.
ogdf::steiner_tree::Save::gain
virtual T gain(node u, node v, node w) const =0
Returns the gain (sum of the save edges) of a node triple.
ogdf::steiner_tree::Triple
This class represents a triple used by various contraction-based minimum Steiner tree approximations.
Definition: common_algorithms.h:48
ogdf::steiner_tree::Save::saveEdge
virtual edge saveEdge(node u, node v) const =0
Returns the save edge between two nodes.
ogdf::steiner_tree::Save::saveWeight
virtual T saveWeight(node u, node v) const =0
Returns the weight of the save edge between two nodes.
ogdf::steiner_tree::Save
This class serves as an interface for different approaches concerning the calculation of save edges.
Definition: Save.h:50
ogdf::steiner_tree
Definition: MinSteinerTreeMehlhorn.h:297
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::steiner_tree::Save::Save
Save()
Definition: Save.h:52
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::steiner_tree::Save::update
virtual void update(const Triple< T > &t)=0
Updates the weighted tree data structure given a contracted triple.