Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 More...
 
void computePositionInOptimalRegion (const bool within_region)
 If the value within_region is set to false, the algorithm samples points outside the optimal region. More...
 
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. More...
 
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. More...
 
- 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 More...
 
void setBoundingBox (double x_min, double y_min, double x_max, double y_max)
 Vertex has to be moved within the given bound. More...
 

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 69 of file CrossingMinimalPosition.h.

Constructor & Destructor Documentation

◆ CrossingMinimalPosition()

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

Definition at line 71 of file CrossingMinimalPosition.h.

◆ ~CrossingMinimalPosition()

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

Definition at line 73 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 99 of file CrossingMinimalPosition.h.

◆ neighborThreshold()

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

Definition at line 111 of file CrossingMinimalPosition.h.

◆ setExactComputation()

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

Definition at line 79 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 107 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 90 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 116 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 114 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 115 of file CrossingMinimalPosition.h.

◆ m_within_region

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

Definition at line 117 of file CrossingMinimalPosition.h.

◆ rnd

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

Definition at line 119 of file CrossingMinimalPosition.h.


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