Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Full2ComponentGenerator.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace steiner_tree {
38 
45 template<typename T>
47 public:
49  inline void call(const EdgeWeightedGraph<T>& G, const List<node>& terminals,
50  const NodeArray<NodeArray<T>>& distance, const NodeArray<NodeArray<edge>>& pred,
51  std::function<void(node, node, T)> generateFunction) const {
52  for (ListConstIterator<node> it_u = terminals.begin(); it_u.valid(); ++it_u) {
53  const node u = *it_u;
54  for (ListConstIterator<node> it_v = it_u.succ(); it_v.valid(); ++it_v) {
55  const node v = *it_v;
56  if (pred[u][v]) {
57  generateFunction(u, v, distance[u][v]);
58  }
59  }
60  }
61  }
62 };
63 
64 }
65 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::steiner_tree::Full2ComponentGenerator::call
void call(const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< NodeArray< T >> &distance, const NodeArray< NodeArray< edge >> &pred, std::function< void(node, node, T)> generateFunction) const
Generate full 2-components and call generateFunction for each full 2-component.
Definition: Full2ComponentGenerator.h:49
ogdf::ListIteratorBase::succ
ListIteratorBase< E, isConst, isReverse > succ() const
Returns successor iterator.
Definition: List.h:164
ogdf::EdgeWeightedGraph
Definition: EdgeWeightedGraph.h:39
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
EdgeWeightedGraph.h
Declaration of class EdgeWeightedGraph.
ogdf::steiner_tree::Full2ComponentGenerator
Trivial full 2-component generation by lookups of shortest paths between terminal pairs.
Definition: Full2ComponentGenerator.h:46
ogdf::ListIteratorBase
Encapsulates a pointer to a list element.
Definition: List.h:46
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233