Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
CrossingMinimalPosition.h
Go to the documentation of this file.
1
46#pragma once
47
50
51#ifdef OGDF_INCLUDE_CGAL
52# include <CGAL/Gmpq.h>
53#endif
54
55namespace ogdf {
56
63template<typename FT>
65public: // ~Initialize vertex position module
67
69
73
75 m_number_of_edge_samples = -1;
76 m_number_of_point_samples = 1;
77 m_neighborhood_threshold = -1;
78 m_within_region = true;
79 }
80
85 void setSampleSize(const unsigned int number_of_edge_samples,
86 const unsigned int number_of_point_samples) {
87 m_number_of_edge_samples = number_of_edge_samples;
88 m_number_of_point_samples = number_of_point_samples;
89 }
90
95 m_within_region = within_region;
96 }
97
102 void setNeighboorhoodThreshold(const unsigned int threshold) {
103 m_neighborhood_threshold = threshold;
104 }
105
106 unsigned int neighborThreshold() const { return m_neighborhood_threshold; }
107
108protected:
109 unsigned int m_number_of_edge_samples = -1;
110 unsigned int m_number_of_point_samples = 1;
111 unsigned int m_neighborhood_threshold = 100;
112 bool m_within_region = true;
113
114 std::mt19937_64 rnd;
115};
116
118
119#ifdef OGDF_INCLUDE_CGAL
121#endif
122
123
125public:
127 m_number_of_edge_samples = 512;
128 m_number_of_point_samples = 1000;
129 m_neighborhood_threshold = 100;
130 m_within_region = true;
131 }
132};
133
135public:
137 m_number_of_edge_samples = 512;
138 m_number_of_point_samples = 1000;
139 m_neighborhood_threshold = 100;
140 m_within_region = false;
141 }
142};
143
144
145}
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Optimal Vertex Position interface.
Compute a crossing minimal position for a vertex.
void computePositionInOptimalRegion(const bool within_region)
If the value within_region is set to false, the algorithm samples points outside the optimal region.
void setNeighboorhoodThreshold(const unsigned int threshold)
The algortihm randomly partitions the neighbor of the vertex into blocks of size threshold.
DPoint call(GraphAttributes &GA, node v)
computes a good position for the vertex v with respect to GA
void setSampleSize(const unsigned int number_of_edge_samples, const unsigned int number_of_point_samples)
set the number of edges that are randomly selected to compute the new vertex postion and the number o...
Stores additional attributes of a graph (like layout information).
Class for the representation of nodes.
Definition Graph_d.h:177
Interface for computing a good / optimal vertex position.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.