Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MinimumEdgeDistances.h
Go to the documentation of this file.
1
34#pragma once
35
37
38namespace ogdf {
39
40
42template<class ATYPE>
44public:
45 // constructor
47
48 // returns delta_s(v)^i (with i = 0 => l, i = 1 => r)
49 const ATYPE& delta(node v, OrthoDir s, int i) const {
50 OGDF_ASSERT(0 <= int(s));
51 OGDF_ASSERT(int(s) <= 3);
52 OGDF_ASSERT(0 <= i);
53 OGDF_ASSERT(i <= 1);
54 return m_delta[v].info[static_cast<int>(s)][i];
55 }
56
57 ATYPE& delta(node v, OrthoDir s, int i) {
58 OGDF_ASSERT(0 <= int(s));
59 OGDF_ASSERT(int(s) <= 3);
60 OGDF_ASSERT(0 <= i);
61 OGDF_ASSERT(i <= 1);
62 return m_delta[v].info[static_cast<int>(s)][i];
63 }
64
65 // returns epsilon_s(v)^i (with i = 0 => l, i = 1 => r)
66 const ATYPE& epsilon(node v, OrthoDir s, int i) const {
67 OGDF_ASSERT(0 <= int(s));
68 OGDF_ASSERT(int(s) <= 3);
69 OGDF_ASSERT(0 <= i);
70 OGDF_ASSERT(i <= 1);
71 return m_epsilon[v].info[static_cast<int>(s)][i];
72 }
73
74 ATYPE& epsilon(node v, OrthoDir s, int i) {
75 OGDF_ASSERT(0 <= int(s));
76 OGDF_ASSERT(int(s) <= 3);
77 OGDF_ASSERT(0 <= i);
78 OGDF_ASSERT(i <= 1);
79 return m_epsilon[v].info[static_cast<int>(s)][i];
80 }
81
82 ATYPE separation() const { return m_sep; }
83
85
86
87private:
88 struct InfoType {
89 ATYPE info[4][2];
90 };
91
95};
96
97}
Declaration of orthogonal representation of planar graphs.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Maintains input sizes for improvement compaction (deltas and epsilons)
MinimumEdgeDistances(const Graph &G, ATYPE sep)
ATYPE & epsilon(node v, OrthoDir s, int i)
const ATYPE & epsilon(node v, OrthoDir s, int i) const
NodeArray< InfoType > m_epsilon
const ATYPE & delta(node v, OrthoDir s, int i) const
NodeArray< InfoType > m_delta
ATYPE & delta(node v, OrthoDir s, int i)
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition basic.h:41
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
OrthoDir
Definition OrthoRep.h:50