Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

Save.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace steiner_tree {
38 
39 template<typename T>
40 
45 class Save {
46 public:
47  Save() {
48  }
49  virtual ~Save() {
50  }
51 
59  virtual T gain(node u, node v, node w) const = 0;
60 
67  virtual T saveWeight(node u, node v) const = 0;
68 
75  virtual edge saveEdge(node u, node v) const = 0;
76 
81  virtual void update(const Triple<T> &t) = 0;
82 };
83 
84 }
85 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::steiner_tree::Save::~Save
virtual ~Save()
Definition: Save.h:49
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: Triple.h:44
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.
Triple.h
Definition of a Triple used in contraction-based approximation algorithm for the minimum Steiner tree...
ogdf::steiner_tree::Save
This class serves as an interface for different approaches concerning the calculation of save edges.
Definition: Save.h:45
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:292
ogdf::steiner_tree::Save::Save
Save()
Definition: Save.h:47
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:169
ogdf::steiner_tree::Save::update
virtual void update(const Triple< T > &t)=0
Updates the weighted tree data structure given a contracted triple.