Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::NearestRectangleFinder Class Reference

Finds in a given set of rectangles for each point in a given set of points the nearest rectangle. More...

#include <ogdf/basic/NearestRectangleFinder.h>

Classes

struct  PairRectDist
 Represents a rectangle (given by its index) and a distance value. More...
 
struct  RectRegion
 Represents a rectangle given by center point, width and height. More...
 

Public Member Functions

 NearestRectangleFinder (double mad=20, double td=5)
 
void find (const Array< RectRegion > &region, const Array< DPoint > &point, Array< List< PairRectDist >> &nearest)
 
void findSimple (const Array< RectRegion > &region, const Array< DPoint > &point, Array< List< PairRectDist >> &nearest)
 
double maxAllowedDistance () const
 
void maxAllowedDistance (double mad)
 
double toleranceDistance () const
 
void toleranceDistance (double td)
 

Private Attributes

double m_maxAllowedDistance
 
double m_toleranceDistance
 

Detailed Description

Finds in a given set of rectangles for each point in a given set of points the nearest rectangle.

Definition at line 46 of file NearestRectangleFinder.h.

Constructor & Destructor Documentation

◆ NearestRectangleFinder()

ogdf::NearestRectangleFinder::NearestRectangleFinder ( double  mad = 20,
double  td = 5 
)
inlineexplicit

Definition at line 52 of file NearestRectangleFinder.h.

Member Function Documentation

◆ find()

void ogdf::NearestRectangleFinder::find ( const Array< RectRegion > &  region,
const Array< DPoint > &  point,
Array< List< PairRectDist >> &  nearest 
)

◆ findSimple()

void ogdf::NearestRectangleFinder::findSimple ( const Array< RectRegion > &  region,
const Array< DPoint > &  point,
Array< List< PairRectDist >> &  nearest 
)

◆ maxAllowedDistance() [1/2]

double ogdf::NearestRectangleFinder::maxAllowedDistance ( ) const
inline

Definition at line 61 of file NearestRectangleFinder.h.

◆ maxAllowedDistance() [2/2]

void ogdf::NearestRectangleFinder::maxAllowedDistance ( double  mad)
inline

Definition at line 59 of file NearestRectangleFinder.h.

◆ toleranceDistance() [1/2]

double ogdf::NearestRectangleFinder::toleranceDistance ( ) const
inline

Definition at line 69 of file NearestRectangleFinder.h.

◆ toleranceDistance() [2/2]

void ogdf::NearestRectangleFinder::toleranceDistance ( double  td)
inline

Definition at line 67 of file NearestRectangleFinder.h.

Member Data Documentation

◆ m_maxAllowedDistance

double ogdf::NearestRectangleFinder::m_maxAllowedDistance
private

Definition at line 88 of file NearestRectangleFinder.h.

◆ m_toleranceDistance

double ogdf::NearestRectangleFinder::m_toleranceDistance
private

Definition at line 91 of file NearestRectangleFinder.h.


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