Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::CrossingMinimalPosition< FT > Class Template Reference

Compute a crossing minimal position for a vertex. More...

#include <ogdf/geometric/CrossingMinimalPosition.h>

+ Inheritance diagram for ogdf::CrossingMinimalPosition< FT >:

Public Member Functions

 CrossingMinimalPosition ()
 
 ~CrossingMinimalPosition ()
 
DPoint call (GraphAttributes &GA, node v)
 computes a good position for the vertex v with respect to GA
 
void computePositionInOptimalRegion (const bool within_region)
 If the value within_region is set to false, the algorithm samples points outside the optimal region.
 
unsigned int neighborThreshold () const
 
void setExactComputation ()
 
void setNeighboorhoodThreshold (const unsigned int threshold)
 The algortihm randomly partitions the neighbor of the vertex into blocks of size threshold.
 
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 of points that are tested within the best region.
 
- Public Member Functions inherited from ogdf::VertexPositionModule
 VertexPositionModule ()
 
 ~VertexPositionModule ()
 
DPoint operator() (GraphAttributes &GA, node v)
 computes a good position for the vertex v with respect to GA
 
void setBoundingBox (double x_min, double y_min, double x_max, double y_max)
 Vertex has to be moved within the given bound.
 

Protected Attributes

unsigned int m_neighborhood_threshold = 100
 
unsigned int m_number_of_edge_samples = -1
 
unsigned int m_number_of_point_samples = 1
 
bool m_within_region = true
 
std::mt19937_64 rnd
 
- Protected Attributes inherited from ogdf::VertexPositionModule
double m_x_max = 1
 
double m_x_min = 0
 
double m_y_max = 1
 
double m_y_min = 0
 

Detailed Description

template<typename FT>
class ogdf::CrossingMinimalPosition< FT >

Compute a crossing minimal position for a vertex.

Template Parameters
FTinternal floating point type. Selecting an exact floating point type ensures robust computations.
Precondition
Requires CGAL! See README.md in this folder.

Definition at line 64 of file CrossingMinimalPosition.h.

Constructor & Destructor Documentation

◆ CrossingMinimalPosition()

template<typename FT >
ogdf::CrossingMinimalPosition< FT >::CrossingMinimalPosition ( )
inline

Definition at line 66 of file CrossingMinimalPosition.h.

◆ ~CrossingMinimalPosition()

Definition at line 68 of file CrossingMinimalPosition.h.

Member Function Documentation

◆ call()

template<typename FT >
DPoint ogdf::CrossingMinimalPosition< FT >::call ( GraphAttributes GA,
node  v 
)
virtual

computes a good position for the vertex v with respect to GA

Implements ogdf::VertexPositionModule.

◆ computePositionInOptimalRegion()

template<typename FT >
void ogdf::CrossingMinimalPosition< FT >::computePositionInOptimalRegion ( const bool  within_region)
inline

If the value within_region is set to false, the algorithm samples points outside the optimal region.

Parameters
within_regionindicates whether the new position has to be within the crossing minimal region

Definition at line 94 of file CrossingMinimalPosition.h.

◆ neighborThreshold()

template<typename FT >
unsigned int ogdf::CrossingMinimalPosition< FT >::neighborThreshold ( ) const
inline

Definition at line 106 of file CrossingMinimalPosition.h.

◆ setExactComputation()

template<typename FT >
void ogdf::CrossingMinimalPosition< FT >::setExactComputation ( )
inline

Definition at line 74 of file CrossingMinimalPosition.h.

◆ setNeighboorhoodThreshold()

template<typename FT >
void ogdf::CrossingMinimalPosition< FT >::setNeighboorhoodThreshold ( const unsigned int  threshold)
inline

The algortihm randomly partitions the neighbor of the vertex into blocks of size threshold.

A large vertex degree results in long running times and considerable memory consumption.

Parameters
thresholdindicates the block size

Definition at line 102 of file CrossingMinimalPosition.h.

◆ setSampleSize()

template<typename FT >
void ogdf::CrossingMinimalPosition< FT >::setSampleSize ( const unsigned int  number_of_edge_samples,
const unsigned int  number_of_point_samples 
)
inline

set the number of edges that are randomly selected to compute the new vertex postion and the number of points that are tested within the best region.

Parameters
number_of_edge_samplesnumber of randomly selected edges
number_of_point_samplesnumber of randomly selected point

Definition at line 85 of file CrossingMinimalPosition.h.

Member Data Documentation

◆ m_neighborhood_threshold

template<typename FT >
unsigned int ogdf::CrossingMinimalPosition< FT >::m_neighborhood_threshold = 100
protected

Definition at line 111 of file CrossingMinimalPosition.h.

◆ m_number_of_edge_samples

template<typename FT >
unsigned int ogdf::CrossingMinimalPosition< FT >::m_number_of_edge_samples = -1
protected

Definition at line 109 of file CrossingMinimalPosition.h.

◆ m_number_of_point_samples

template<typename FT >
unsigned int ogdf::CrossingMinimalPosition< FT >::m_number_of_point_samples = 1
protected

Definition at line 110 of file CrossingMinimalPosition.h.

◆ m_within_region

template<typename FT >
bool ogdf::CrossingMinimalPosition< FT >::m_within_region = true
protected

Definition at line 112 of file CrossingMinimalPosition.h.

◆ rnd

template<typename FT >
std::mt19937_64 ogdf::CrossingMinimalPosition< FT >::rnd
protected

Definition at line 114 of file CrossingMinimalPosition.h.


The documentation for this class was generated from the following file: