Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

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

Classes

struct  NodeData
 the node data More...
 
struct  PointData
 the point data More...
 

Public Types

using Tree = typename WSPD::Tree
 
using WSPD = DTreeWSPD< Dim >
 

Public Member Functions

 DTreeForce (int numPoints)
 constructs a new WSPD (well-separated pair decomposition) for numPoints More...
 
virtual ~DTreeForce ()
 destructor More...
 
template<typename ForceFunc , bool UseForcePrime>
void computeForces (ForceFunc forceFunc)
 main call More...
 
double force (int i, int d) const
 returns d-th coordinate of the i-th force vector More...
 
double force_prime (int i) const
 returns derivation of the d-th coordinate of the i-th force vector More...
 
double mass (int i) const
 returns the mass of the i-th point More...
 
int numPoints () const
 returns the number of points More...
 
double position (int i, int d) const
 returns d-th coordinate of the i-th point More...
 
void setMass (int i, double m)
 sets the mass of the i-th point More...
 
void setPosition (int i, int d, double c)
 sets the d-th coordinate of the i-th point More...
 
const Treetree () const
 returns a const reference to the tree More...
 
const WSPDwspd () const
 returns a const ref to the wspd More...
 

Private Member Functions

void allocate ()
 internal for allocating mem More...
 
void bottomUpPhase (int curr)
 internal function for computing the mass and center of mass of quadtree nodes More...
 
void deallocate ()
 internal for allocating mem More...
 
void resetPointForces ()
 reset the point forces More...
 
void resetTreeNodes ()
 reset the tree nodes More...
 
void topDownPhase (int curr)
 internal function for accumulating forces in the leaves More...
 
WSPDwspd ()
 returns the wspd More...
 

Private Attributes

NodeDatam_nodeData
 array for the node related data More...
 
int m_numPoints
 the number of points More...
 
PointDatam_pointData
 array for the point related data More...
 
WSPDm_pWSPD
 the WSPD instance More...
 

Friends

template<int _Dim, typename ForceFunc , bool UseForcePrime>
class DTreeWSPDCallback
 

Detailed Description

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

Definition at line 42 of file DTreeForce.h.

Member Typedef Documentation

◆ Tree

template<int Dim>
using ogdf::energybased::dtree::DTreeForce< Dim >::Tree = typename WSPD::Tree

Definition at line 48 of file DTreeForce.h.

◆ WSPD

template<int Dim>
using ogdf::energybased::dtree::DTreeForce< Dim >::WSPD = DTreeWSPD<Dim>

Definition at line 47 of file DTreeForce.h.

Constructor & Destructor Documentation

◆ DTreeForce()

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

constructs a new WSPD (well-separated pair decomposition) for numPoints

Definition at line 187 of file DTreeForce.h.

◆ ~DTreeForce()

template<int Dim>
ogdf::energybased::dtree::DTreeForce< Dim >::~DTreeForce
virtual

destructor

Definition at line 195 of file DTreeForce.h.

Member Function Documentation

◆ allocate()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::allocate
private

internal for allocating mem

Definition at line 201 of file DTreeForce.h.

◆ bottomUpPhase()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::bottomUpPhase ( int  curr)
private

internal function for computing the mass and center of mass of quadtree nodes

Definition at line 290 of file DTreeForce.h.

◆ computeForces()

template<int Dim>
template<typename ForceFunc , bool UseForcePrime>
void ogdf::energybased::dtree::DTreeForce< Dim >::computeForces ( ForceFunc  forceFunc)

main call

Definition at line 266 of file DTreeForce.h.

◆ deallocate()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::deallocate
private

internal for allocating mem

Definition at line 213 of file DTreeForce.h.

◆ force()

template<int Dim>
double ogdf::energybased::dtree::DTreeForce< Dim >::force ( int  i,
int  d 
) const

returns d-th coordinate of the i-th force vector

Definition at line 255 of file DTreeForce.h.

◆ force_prime()

template<int Dim>
double ogdf::energybased::dtree::DTreeForce< Dim >::force_prime ( int  i) const

returns derivation of the d-th coordinate of the i-th force vector

Definition at line 260 of file DTreeForce.h.

◆ mass()

template<int Dim>
double ogdf::energybased::dtree::DTreeForce< Dim >::mass ( int  i) const

returns the mass of the i-th point

Definition at line 245 of file DTreeForce.h.

◆ numPoints()

template<int Dim>
int ogdf::energybased::dtree::DTreeForce< Dim >::numPoints ( ) const
inline

returns the number of points

Definition at line 79 of file DTreeForce.h.

◆ position()

template<int Dim>
double ogdf::energybased::dtree::DTreeForce< Dim >::position ( int  i,
int  d 
) const

returns d-th coordinate of the i-th point

Definition at line 235 of file DTreeForce.h.

◆ resetPointForces()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::resetPointForces
private

reset the point forces

Definition at line 379 of file DTreeForce.h.

◆ resetTreeNodes()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::resetTreeNodes ( )
private

reset the tree nodes

◆ setMass()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::setMass ( int  i,
double  m 
)

sets the mass of the i-th point

Definition at line 250 of file DTreeForce.h.

◆ setPosition()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::setPosition ( int  i,
int  d,
double  c 
)

sets the d-th coordinate of the i-th point

Definition at line 240 of file DTreeForce.h.

◆ topDownPhase()

template<int Dim>
void ogdf::energybased::dtree::DTreeForce< Dim >::topDownPhase ( int  curr)
private

internal function for accumulating forces in the leaves

Definition at line 341 of file DTreeForce.h.

◆ tree()

template<int Dim>
const DTreeForce< Dim >::Tree & ogdf::energybased::dtree::DTreeForce< Dim >::tree

returns a const reference to the tree

Definition at line 230 of file DTreeForce.h.

◆ wspd() [1/2]

template<int Dim>
WSPD& ogdf::energybased::dtree::DTreeForce< Dim >::wspd ( )
private

returns the wspd

◆ wspd() [2/2]

template<int Dim>
DTreeForce< Dim >::WSPD & ogdf::energybased::dtree::DTreeForce< Dim >::wspd

returns a const ref to the wspd

Definition at line 220 of file DTreeForce.h.

Friends And Related Function Documentation

◆ DTreeWSPDCallback

template<int Dim>
template<int _Dim, typename ForceFunc , bool UseForcePrime>
friend class DTreeWSPDCallback
friend

Definition at line 45 of file DTreeForce.h.

Member Data Documentation

◆ m_nodeData

template<int Dim>
NodeData* ogdf::energybased::dtree::DTreeForce< Dim >::m_nodeData
private

array for the node related data

Definition at line 139 of file DTreeForce.h.

◆ m_numPoints

template<int Dim>
int ogdf::energybased::dtree::DTreeForce< Dim >::m_numPoints
private

the number of points

Definition at line 142 of file DTreeForce.h.

◆ m_pointData

template<int Dim>
PointData* ogdf::energybased::dtree::DTreeForce< Dim >::m_pointData
private

array for the point related data

Definition at line 136 of file DTreeForce.h.

◆ m_pWSPD

template<int Dim>
WSPD* ogdf::energybased::dtree::DTreeForce< Dim >::m_pWSPD
private

the WSPD instance

Definition at line 145 of file DTreeForce.h.


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