Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
55 namespace ogdf {
56 
63 template<typename FT>
65 public: // ~Initialize vertex position module
67 
69 
72  DPoint call(GraphAttributes& GA, node v);
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 
94  void computePositionInOptimalRegion(const bool within_region) {
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 
108 protected:
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
120 using CrossingMinimalPositionPrecise = CrossingMinimalPosition<CGAL::Gmpq>;
121 #endif
122 
123 
125 public:
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 
135 public:
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 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ogdf::GenericPoint< double >
VertexPositionModule.h
Optimal Vertex Position interface.
ogdf::CrossingMinimalPosition::setSampleSize
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...
Definition: CrossingMinimalPosition.h:85
ogdf::CrossingMinimalPosition
Compute a crossing minimal position for a vertex.
Definition: CrossingMinimalPosition.h:64
ogdf::CrossingMinimalPositionApxWeighted::CrossingMinimalPositionApxWeighted
CrossingMinimalPositionApxWeighted()
Definition: CrossingMinimalPosition.h:136
ogdf::CrossingMinimalPosition::~CrossingMinimalPosition
~CrossingMinimalPosition()
Definition: CrossingMinimalPosition.h:68
ogdf::VertexPositionModule
Interface for computing a good / optimal vertex position.
Definition: VertexPositionModule.h:43
ogdf::CrossingMinimalPosition::CrossingMinimalPosition
CrossingMinimalPosition()
Definition: CrossingMinimalPosition.h:66
ogdf::CrossingMinimalPositionApx::CrossingMinimalPositionApx
CrossingMinimalPositionApx()
Definition: CrossingMinimalPosition.h:126
ogdf::CrossingMinimalPosition::setNeighboorhoodThreshold
void setNeighboorhoodThreshold(const unsigned int threshold)
The algortihm randomly partitions the neighbor of the vertex into blocks of size threshold.
Definition: CrossingMinimalPosition.h:102
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::CrossingMinimalPosition::neighborThreshold
unsigned int neighborThreshold() const
Definition: CrossingMinimalPosition.h:106
ogdf::CrossingMinimalPosition::rnd
std::mt19937_64 rnd
Definition: CrossingMinimalPosition.h:114
ogdf::CrossingMinimalPositionApxWeighted
Definition: CrossingMinimalPosition.h:134
ogdf::CrossingMinimalPosition::computePositionInOptimalRegion
void computePositionInOptimalRegion(const bool within_region)
If the value within_region is set to false, the algorithm samples points outside the optimal region.
Definition: CrossingMinimalPosition.h:94
ogdf::CrossingMinimalPositionApx
Definition: CrossingMinimalPosition.h:124
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::CrossingMinimalPosition::setExactComputation
void setExactComputation()
Definition: CrossingMinimalPosition.h:74