Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
 
virtual ~DTreeForce ()
 destructor
 
template<typename ForceFunc , bool UseForcePrime>
void computeForces (ForceFunc forceFunc)
 main call
 
double force (int i, int d) const
 returns d-th coordinate of the i-th force vector
 
double force_prime (int i) const
 returns derivation of the d-th coordinate of the i-th force vector
 
double mass (int i) const
 returns the mass of the i-th point
 
int numPoints () const
 returns the number of points
 
double position (int i, int d) const
 returns d-th coordinate of the i-th point
 
void setMass (int i, double m)
 sets the mass of the i-th point
 
void setPosition (int i, int d, double c)
 sets the d-th coordinate of the i-th point
 
const Treetree () const
 returns a const reference to the tree
 
const WSPDwspd () const
 returns a const ref to the wspd
 

Private Member Functions

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

Private Attributes

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

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

Definition at line 48 of file DTreeForce.h.

◆ WSPD

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 ( ) const

returns a const reference to the tree

Definition at line 230 of file DTreeForce.h.

◆ wspd() [1/2]

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

returns the wspd

Definition at line 225 of file DTreeForce.h.

◆ wspd() [2/2]

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

returns a const ref to the wspd

Definition at line 220 of file DTreeForce.h.

Friends And Related Symbol 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: