Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

LinearQuadtreeExpansion.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace fast_multipole_embedder {
38 
40 {
41 public:
43  LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree& tree);
44 
47 
49  void P2M(uint32_t point, uint32_t receiver);
50 
52  void M2M(uint32_t source, uint32_t receiver);
53 
55  void M2L(uint32_t source, uint32_t receiver);
56 
58  void L2L(uint32_t source, uint32_t receiver);
59 
61  void L2P(uint32_t source, uint32_t point, float& fx, float& fy);
62 
64  uint32_t sizeInBytes() const { return m_numExp*m_numCoeff*(uint32_t)sizeof(double)*4; }
65 
67  inline double* multiExp() const { return m_multiExp; }
68 
70  inline double* localExp() const { return m_localExp; }
71 
73  inline uint32_t numCoeff() const { return m_numCoeff; }
74 
76  const LinearQuadtree& tree() { return m_tree; }
77 private:
78 
80  void allocate();
81 
83  void deallocate();
84 
87 public:
89  double* m_multiExp;
90 
92  double* m_localExp;
93 
94 public:
96  uint32_t m_numExp;
97 
99  uint32_t m_numCoeff;
100 
102 };
103 
104 }
105 }
double * m_localExp
the big local expansion coeff array
double * m_multiExp
the big multipole expansione coeff array
uint32_t numCoeff() const
number of coefficients per expansions
LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree &tree)
constructor
uint32_t m_numExp
the number of multipole (locale) expansions
void allocate()
allocates the space for the coeffs
uint32_t m_numCoeff
the number of coeff per expansions
void deallocate()
releases the memory for the coeffs
void P2M(uint32_t point, uint32_t receiver)
adds a point with the given charge to the receiver expansion
double * multiExp() const
returns the array with multipole coefficients
double * localExp() const
returns the array with local coefficients
Declaration of class LinearQuadtree.
const LinearQuadtree & m_tree
the Quadtree reference
uint32_t sizeInBytes() const
returns the size in bytes
void L2L(uint32_t source, uint32_t receiver)
shifts the source local coefficient to the center of the receiver and adds them
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 ...
The namespace for all OGDF objects.
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...
void M2M(uint32_t source, uint32_t receiver)
shifts the source multipole coefficient to the center of the receiver and adds them ...