Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::energybased::dtree::DTreeWSPD< Dim > Class Template Reference

#include <ogdf/energybased/dtree/DTreeWSPD.h>

Classes

struct  NodeData
 geometry for the quadtree nodes More...
 
struct  PointData
 world coordinates of the points More...
 

Public Types

using IntType = unsigned int
 
using Tree = DTree< IntType, Dim >
 

Public Member Functions

 DTreeWSPD (int numPoints)
 constructs a new WSPD for numPoints More...
 
 ~DTreeWSPD ()
 destructor More...
 
void computeWSPD (IWSPD *m_pIWSPD)
 
const NodeDatanode (int i) const
 returns the data for a quadtree More...
 
const PointDatapoint (int i) const
 return ith point More...
 
double separationFactor () const
 returns the parameter s of the WSPD (default is 1.0) More...
 
void setPoint (int i, int d, double coord)
 sets the point to the given coords More...
 
void setSeparationFactor (double s)
 sets the parameter s of the WSPD (default is 1.0) More...
 
const Treetree () const
 returns the corresponding Dtree More...
 
void update ()
 call this when the point set has been updated. More...
 

Protected Member Functions

void allocate ()
 allocate mem More...
 
bool areWellSeparated (int a, int b) const
 predicate for determining if cells are well-separated More...
 
bool areWellSeparated (int a, int b) const
 
bool areWellSeparated (int a, int b) const
 
void deallocate ()
 free mem More...
 
NodeDatanode (int i)
 returns the data for a quadtree More...
 
void updateBoundingBox ()
 updates the bounding box by iterating over all points More...
 
void updateTreeGridPoints ()
 updates the integer grid points in the quadtree More...
 
void updateTreeNodeGeometry ()
 updates the geometry of the quadtree nodes More...
 
void updateTreeNodeGeometry (int curr)
 the recursive function of the above More...
 
void wspdRecursive (int a)
 the unary recursive function generating the binary calls More...
 
void wspdRecursive (int a, int b)
 the binary recursive function to separate the subtree a and b More...
 

Protected Attributes

double m_bboxMax [Dim]
 the bounding box max coord of the point set More...
 
double m_bboxMin [Dim]
 the bounding box min coord of the point set More...
 
NodeDatam_nodeData = nullptr
 geometry for the quadtree nodes More...
 
int m_numPoints
 number of points More...
 
IWSPDm_pIWSPD = nullptr
 
PointDatam_pointData = nullptr
 point data More...
 
Treem_pTree = nullptr
 the quadtree this wspd is working on More...
 
double m_wspdSeparationFactor
 the separation factor for the ws predicate More...
 
double m_wspdSeparationFactorPlus2Squared_cached
 a cached value for the ws test More...
 

Detailed Description

template<int Dim>
class ogdf::energybased::dtree::DTreeWSPD< Dim >

Definition at line 45 of file DTreeWSPD.h.

Member Typedef Documentation

◆ IntType

template<int Dim>
using ogdf::energybased::dtree::DTreeWSPD< Dim >::IntType = unsigned int

Definition at line 47 of file DTreeWSPD.h.

◆ Tree

template<int Dim>
using ogdf::energybased::dtree::DTreeWSPD< Dim >::Tree = DTree<IntType, Dim>

Definition at line 48 of file DTreeWSPD.h.

Constructor & Destructor Documentation

◆ DTreeWSPD()

template<int Dim>
ogdf::energybased::dtree::DTreeWSPD< Dim >::DTreeWSPD ( int  numPoints)
explicit

constructs a new WSPD for numPoints

Definition at line 161 of file DTreeWSPD.h.

◆ ~DTreeWSPD()

template<int Dim>
ogdf::energybased::dtree::DTreeWSPD< Dim >::~DTreeWSPD

destructor

Definition at line 176 of file DTreeWSPD.h.

Member Function Documentation

◆ allocate()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::allocate
protected

allocate mem

Definition at line 182 of file DTreeWSPD.h.

◆ areWellSeparated() [1/3]

template<int Dim>
bool ogdf::energybased::dtree::DTreeWSPD< Dim >::areWellSeparated ( int  a,
int  b 
) const
protected

predicate for determining if cells are well-separated

Definition at line 272 of file DTreeWSPD.h.

◆ areWellSeparated() [2/3]

bool ogdf::energybased::dtree::DTreeWSPD< 2 >::areWellSeparated ( int  a,
int  b 
) const
protected

Definition at line 304 of file DTreeWSPD.h.

◆ areWellSeparated() [3/3]

bool ogdf::energybased::dtree::DTreeWSPD< 3 >::areWellSeparated ( int  a,
int  b 
) const
protected

Definition at line 318 of file DTreeWSPD.h.

◆ computeWSPD()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::computeWSPD ( IWSPD m_pIWSPD)

Definition at line 211 of file DTreeWSPD.h.

◆ deallocate()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::deallocate
protected

free mem

Definition at line 189 of file DTreeWSPD.h.

◆ node() [1/2]

template<int Dim>
NodeData& ogdf::energybased::dtree::DTreeWSPD< Dim >::node ( int  i)
inlineprotected

returns the data for a quadtree

Definition at line 105 of file DTreeWSPD.h.

◆ node() [2/2]

template<int Dim>
const NodeData& ogdf::energybased::dtree::DTreeWSPD< Dim >::node ( int  i) const
inline

returns the data for a quadtree

Definition at line 84 of file DTreeWSPD.h.

◆ point()

template<int Dim>
const PointData& ogdf::energybased::dtree::DTreeWSPD< Dim >::point ( int  i) const
inline

return ith point

Definition at line 90 of file DTreeWSPD.h.

◆ separationFactor()

template<int Dim>
double ogdf::energybased::dtree::DTreeWSPD< Dim >::separationFactor ( ) const
inline

returns the parameter s of the WSPD (default is 1.0)

Definition at line 96 of file DTreeWSPD.h.

◆ setPoint()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::setPoint ( int  i,
int  d,
double  coord 
)

sets the point to the given coords

Definition at line 334 of file DTreeWSPD.h.

◆ setSeparationFactor()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::setSeparationFactor ( double  s)
inline

sets the parameter s of the WSPD (default is 1.0)

Definition at line 99 of file DTreeWSPD.h.

◆ tree()

template<int Dim>
const Tree& ogdf::energybased::dtree::DTreeWSPD< Dim >::tree ( ) const
inline

returns the corresponding Dtree

Definition at line 81 of file DTreeWSPD.h.

◆ update()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::update

call this when the point set has been updated.

Definition at line 196 of file DTreeWSPD.h.

◆ updateBoundingBox()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::updateBoundingBox
protected

updates the bounding box by iterating over all points

Definition at line 339 of file DTreeWSPD.h.

◆ updateTreeGridPoints()

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::updateTreeGridPoints
protected

updates the integer grid points in the quadtree

Definition at line 360 of file DTreeWSPD.h.

◆ updateTreeNodeGeometry() [1/2]

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::updateTreeNodeGeometry
protected

updates the geometry of the quadtree nodes

Definition at line 394 of file DTreeWSPD.h.

◆ updateTreeNodeGeometry() [2/2]

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::updateTreeNodeGeometry ( int  curr)
protected

the recursive function of the above

Definition at line 400 of file DTreeWSPD.h.

◆ wspdRecursive() [1/2]

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::wspdRecursive ( int  a)
protected

the unary recursive function generating the binary calls

Definition at line 226 of file DTreeWSPD.h.

◆ wspdRecursive() [2/2]

template<int Dim>
void ogdf::energybased::dtree::DTreeWSPD< Dim >::wspdRecursive ( int  a,
int  b 
)
protected

the binary recursive function to separate the subtree a and b

Definition at line 247 of file DTreeWSPD.h.

Member Data Documentation

◆ m_bboxMax

template<int Dim>
double ogdf::energybased::dtree::DTreeWSPD< Dim >::m_bboxMax[Dim]
protected

the bounding box max coord of the point set

Definition at line 156 of file DTreeWSPD.h.

◆ m_bboxMin

template<int Dim>
double ogdf::energybased::dtree::DTreeWSPD< Dim >::m_bboxMin[Dim]
protected

the bounding box min coord of the point set

Definition at line 153 of file DTreeWSPD.h.

◆ m_nodeData

template<int Dim>
NodeData* ogdf::energybased::dtree::DTreeWSPD< Dim >::m_nodeData = nullptr
protected

geometry for the quadtree nodes

Definition at line 147 of file DTreeWSPD.h.

◆ m_numPoints

template<int Dim>
int ogdf::energybased::dtree::DTreeWSPD< Dim >::m_numPoints
protected

number of points

Definition at line 135 of file DTreeWSPD.h.

◆ m_pIWSPD

template<int Dim>
IWSPD* ogdf::energybased::dtree::DTreeWSPD< Dim >::m_pIWSPD = nullptr
protected

Definition at line 102 of file DTreeWSPD.h.

◆ m_pointData

template<int Dim>
PointData* ogdf::energybased::dtree::DTreeWSPD< Dim >::m_pointData = nullptr
protected

point data

Definition at line 150 of file DTreeWSPD.h.

◆ m_pTree

template<int Dim>
Tree* ogdf::energybased::dtree::DTreeWSPD< Dim >::m_pTree = nullptr
protected

the quadtree this wspd is working on

Definition at line 144 of file DTreeWSPD.h.

◆ m_wspdSeparationFactor

template<int Dim>
double ogdf::energybased::dtree::DTreeWSPD< Dim >::m_wspdSeparationFactor
protected

the separation factor for the ws predicate

Definition at line 138 of file DTreeWSPD.h.

◆ m_wspdSeparationFactorPlus2Squared_cached

template<int Dim>
double ogdf::energybased::dtree::DTreeWSPD< Dim >::m_wspdSeparationFactorPlus2Squared_cached
protected

a cached value for the ws test

Definition at line 141 of file DTreeWSPD.h.


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