#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 Tree & | tree () const |
returns a const reference to the tree | |
const WSPD & | wspd () 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 | |
WSPD & | wspd () |
returns the wspd | |
Private Attributes | |
NodeData * | m_nodeData |
array for the node related data | |
int | m_numPoints |
the number of points | |
PointData * | m_pointData |
array for the point related data | |
WSPD * | m_pWSPD |
the WSPD instance | |
Friends | |
template<int _Dim, typename ForceFunc , bool UseForcePrime> | |
class | DTreeWSPDCallback |
Definition at line 42 of file DTreeForce.h.
using ogdf::energybased::dtree::DTreeForce< Dim >::Tree = typename WSPD::Tree |
Definition at line 48 of file DTreeForce.h.
Definition at line 47 of file DTreeForce.h.
|
explicit |
constructs a new WSPD (well-separated pair decomposition) for numPoints
Definition at line 187 of file DTreeForce.h.
|
virtual |
destructor
Definition at line 195 of file DTreeForce.h.
|
private |
internal for allocating mem
Definition at line 201 of file DTreeForce.h.
|
private |
internal function for computing the mass and center of mass of quadtree nodes
Definition at line 290 of file DTreeForce.h.
void ogdf::energybased::dtree::DTreeForce< Dim >::computeForces | ( | ForceFunc | forceFunc | ) |
main call
Definition at line 266 of file DTreeForce.h.
|
private |
internal for allocating mem
Definition at line 213 of file DTreeForce.h.
returns d-th coordinate of the i-th force vector
Definition at line 255 of file DTreeForce.h.
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.
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.
|
inline |
returns the number of points
Definition at line 79 of file DTreeForce.h.
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.
|
private |
reset the point forces
Definition at line 379 of file DTreeForce.h.
|
private |
reset the tree nodes
sets the mass of the i-th point
Definition at line 250 of file DTreeForce.h.
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.
|
private |
internal function for accumulating forces in the leaves
Definition at line 341 of file DTreeForce.h.
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.
|
private |
returns the wspd
Definition at line 225 of file DTreeForce.h.
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.
|
friend |
Definition at line 45 of file DTreeForce.h.
|
private |
array for the node related data
Definition at line 139 of file DTreeForce.h.
|
private |
the number of points
Definition at line 142 of file DTreeForce.h.
|
private |
array for the point related data
Definition at line 136 of file DTreeForce.h.
|
private |
the WSPD instance
Definition at line 145 of file DTreeForce.h.