#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 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 | ( | ) | const |
returns a const reference to the tree
Definition at line 228 of file DTreeForce.h.
|
private |
returns the wspd
Definition at line 223 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 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.