Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LinearQuadtreeExpansion.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 #include <cstdint>
37 
39 class LinearQuadtree;
40 } // namespace ogdf::fast_multipole_embedder
41 
42 namespace ogdf {
43 namespace fast_multipole_embedder {
44 
46 public:
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 
83 private:
85  void allocate();
86 
88  void deallocate();
89 
92 
93 public:
95  double* m_multiExp;
96 
98  double* m_localExp;
99 
100 public:
102  uint32_t m_numExp;
103 
105  uint32_t m_numCoeff;
106 
108 };
109 
110 }
111 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::allocate
void allocate()
allocates the space for the coeffs
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::numCoeff
uint32_t numCoeff() const
number of coefficients per expansions
Definition: LinearQuadtreeExpansion.h:78
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion
Definition: LinearQuadtreeExpansion.h:45
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::P2M
void P2M(uint32_t point, uint32_t receiver)
adds a point with the given charge to the receiver expansion
FastUtils.h
Definition of utility functions for FME layout.
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::L2L
void L2L(uint32_t source, uint32_t receiver)
shifts the source local coefficient to the center of the receiver and adds them
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_numExp
uint32_t m_numExp
the number of multipole (locale) expansions
Definition: LinearQuadtreeExpansion.h:102
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_localExp
double * m_localExp
the big local expansion coeff array
Definition: LinearQuadtreeExpansion.h:98
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::binCoef
BinCoeff< double > binCoef
Definition: LinearQuadtreeExpansion.h:107
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_tree
const LinearQuadtree & m_tree
the Quadtree reference
Definition: LinearQuadtreeExpansion.h:91
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_multiExp
double * m_multiExp
the big multipole expansione coeff array
Definition: LinearQuadtreeExpansion.h:95
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::~LinearQuadtreeExpansion
~LinearQuadtreeExpansion(void)
destructor
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::sizeInBytes
uint32_t sizeInBytes() const
returns the size in bytes
Definition: LinearQuadtreeExpansion.h:69
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::tree
const LinearQuadtree & tree()
the quadtree
Definition: LinearQuadtreeExpansion.h:81
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::deallocate
void deallocate()
releases the memory for the coeffs
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::M2M
void M2M(uint32_t source, uint32_t receiver)
shifts the source multipole coefficient to the center of the receiver and adds them
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::multiExp
double * multiExp() const
returns the array with multipole coefficients
Definition: LinearQuadtreeExpansion.h:72
ogdf::fast_multipole_embedder::LinearQuadtree
Definition: LinearQuadtree.h:50
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_numCoeff
uint32_t m_numCoeff
the number of coeff per expansions
Definition: LinearQuadtreeExpansion.h:105
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::LinearQuadtreeExpansion
LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree &tree)
constructor
ogdf::fast_multipole_embedder
Definition: ArrayGraph.h:44
ogdf::fast_multipole_embedder::BinCoeff< double >
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::localExp
double * localExp() const
returns the array with local coefficients
Definition: LinearQuadtreeExpansion.h:75
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::L2P
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
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::M2L
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...