#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 Tree & | tree () const |
returns a const reference to the tree More... | |
const WSPD & | wspd () 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... | |
WSPD & | wspd () |
returns the wspd More... | |
Private Attributes | |
NodeData * | m_nodeData |
array for the node related data More... | |
int | m_numPoints |
the number of points More... | |
PointData * | m_pointData |
array for the point related data More... | |
WSPD * | m_pWSPD |
the WSPD instance More... | |
Friends | |
template<int _Dim, typename ForceFunc , bool UseForcePrime> | |
class | DTreeWSPDCallback |
Definition at line 40 of file DTreeForce.h.
using ogdf::energybased::dtree::DTreeForce< Dim >::Tree = typename WSPD::Tree |
Definition at line 46 of file DTreeForce.h.
using ogdf::energybased::dtree::DTreeForce< Dim >::WSPD = DTreeWSPD<Dim> |
Definition at line 45 of file DTreeForce.h.
|
explicit |
constructs a new WSPD (well-separated pair decomposition) for numPoints
Definition at line 185 of file DTreeForce.h.
|
virtual |
destructor
Definition at line 193 of file DTreeForce.h.
|
private |
internal for allocating mem
Definition at line 199 of file DTreeForce.h.
|
private |
internal function for computing the mass and center of mass of quadtree nodes
Definition at line 288 of file DTreeForce.h.
void ogdf::energybased::dtree::DTreeForce< Dim >::computeForces | ( | ForceFunc | forceFunc | ) |
main call
Definition at line 264 of file DTreeForce.h.
|
private |
internal for allocating mem
Definition at line 211 of file DTreeForce.h.
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 253 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 258 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 243 of file DTreeForce.h.
|
inline |
returns the number of points
Definition at line 77 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 233 of file DTreeForce.h.
|
private |
reset the point forces
Definition at line 377 of file DTreeForce.h.
|
private |
reset the tree nodes
void ogdf::energybased::dtree::DTreeForce< Dim >::setMass | ( | int | i, |
double | m | ||
) |
sets the mass of the i-th point
Definition at line 248 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 238 of file DTreeForce.h.
|
private |
internal function for accumulating forces in the leaves
Definition at line 339 of file DTreeForce.h.
const DTreeForce< Dim >::Tree & ogdf::energybased::dtree::DTreeForce< Dim >::tree |
returns a const reference to the tree
Definition at line 228 of file DTreeForce.h.
|
private |
returns the wspd
DTreeForce< Dim >::WSPD & ogdf::energybased::dtree::DTreeForce< Dim >::wspd |
returns a const ref to the wspd
Definition at line 218 of file DTreeForce.h.
|
friend |
Definition at line 43 of file DTreeForce.h.
|
private |
array for the node related data
Definition at line 137 of file DTreeForce.h.
|
private |
the number of points
Definition at line 140 of file DTreeForce.h.
|
private |
array for the point related data
Definition at line 134 of file DTreeForce.h.
|
private |
the WSPD instance
Definition at line 143 of file DTreeForce.h.