Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
LinearQuadtreeExpansion.h
Go to the documentation of this file.
1
32#pragma once
33
35
36#include <cstdint>
37
39class LinearQuadtree;
40} // namespace ogdf::fast_multipole_embedder
41
42namespace ogdf {
43namespace fast_multipole_embedder {
44
46public:
48 LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree& tree);
49
52
54 void P2M(uint32_t point, uint32_t receiver);
55
57 void M2M(uint32_t source, uint32_t receiver);
58
60 void M2L(uint32_t source, uint32_t receiver);
61
63 void L2L(uint32_t source, uint32_t receiver);
64
66 void L2P(uint32_t source, uint32_t point, float& fx, float& fy);
67
69 uint32_t sizeInBytes() const { return m_numExp * m_numCoeff * (uint32_t)sizeof(double) * 4; }
70
72 inline double* multiExp() const { return m_multiExp; }
73
75 inline double* localExp() const { return m_localExp; }
76
78 inline uint32_t numCoeff() const { return m_numCoeff; }
79
81 const LinearQuadtree& tree() { return m_tree; }
82
83private:
85 void allocate();
86
88 void deallocate();
89
92
93public:
95 double* m_multiExp;
96
98 double* m_localExp;
99
100public:
102 uint32_t m_numExp;
103
105 uint32_t m_numCoeff;
106
108};
109
110}
111}
Definition of utility functions for FME layout.
binomial coeffs from Hachuls FMMM
Definition FastUtils.h:295
uint32_t numCoeff() const
number of coefficients per expansions
const LinearQuadtree & m_tree
the Quadtree reference
double * multiExp() const
returns the array with multipole coefficients
void allocate()
allocates the space for the coeffs
uint32_t m_numCoeff
the number of coeff per expansions
void P2M(uint32_t point, uint32_t receiver)
adds a point with the given charge to the receiver expansion
LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree &tree)
constructor
void deallocate()
releases the memory for the coeffs
double * m_multiExp
the big multipole expansione coeff array
void M2L(uint32_t source, uint32_t receiver)
converts the source multipole coefficient in to a local coefficients at the center of the receiver an...
double * localExp() const
returns the array with local coefficients
void M2M(uint32_t source, uint32_t receiver)
shifts the source multipole coefficient to the center of the receiver and adds them
uint32_t sizeInBytes() const
returns the size in bytes
void L2P(uint32_t source, uint32_t point, float &fx, float &fy)
evaluates the derivate of the local expansion at the point and adds the forces to fx fy
double * m_localExp
the big local expansion coeff array
void L2L(uint32_t source, uint32_t receiver)
shifts the source local coefficient to the center of the receiver and adds them
uint32_t m_numExp
the number of multipole (locale) expansions
The namespace for all OGDF objects.