Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LinearQuadtree.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
37 
38 #include <algorithm>
39 #include <cstdint>
40 
41 #define OGDF_LQ_M2L_MIN_BOUND 8
42 #define OGDF_LQ_WSPD_BRANCH_BOUND 16
43 #define OGDF_LQ_WSPD_BOUND 25
44 
45 namespace ogdf {
46 namespace fast_multipole_embedder {
47 
48 class WSPD;
49 
51  friend class LinearQuadtreeBuilder;
53 
54 public:
55  using NodeID = unsigned int;
56  using PointID = unsigned int;
57 
58  struct LQPoint // 16 byte
59  {
60  MortonNR mortonNr; // 8 byte
61  uint32_t node; // 4 byte
62  uint32_t ref; // 4 byte
63  };
64 
65  struct LQNode // 27 byte
66  {
67  uint32_t level; // 4 byte
68  NodeID next; // 4 byte
69  NodeID child[4]; // 4 byte *4 = 16 byte
70  uint32_t numChilds; // 4 byte
71  PointID firstPoint; // 4 byte
72  uint32_t numPoints; // 4 byte
73  bool fence; // 1 byte
74  };
75 
76  struct LQWSPair {
77  LQWSPair(NodeID c, NodeID d) : a(c), b(d) {};
78  NodeID a;
80  };
81 
84 
86 
87  inline bool operator()(NodeID u) { return tree.isFence(u); }
88  };
89 
92  return is_fence_condition_functor(*this);
93  }
94 
97 
99 
100  inline bool operator()(NodeID u) { return tree.isLeaf(u); }
101  };
102 
105  return is_leaf_condition_functor(*this);
106  }
107 
109  template<typename F>
112  F func;
114  uint32_t numNodes;
115 
116  forall_tree_nodes_functor(const LinearQuadtree& t, F f, NodeID b, uint32_t num)
117  : tree(t), func(f), begin(b), numNodes(num) { }
118 
119  inline void operator()() {
120  NodeID it = begin;
121  for (uint32_t i = 0; i < numNodes; i++) {
122  func(it);
123  it = tree.nextNode(it);
124  }
125  }
126  };
127 
129  template<typename F>
130  inline forall_tree_nodes_functor<F> forall_tree_nodes(F f, NodeID begin, uint32_t num) const {
131  return forall_tree_nodes_functor<F>(*this, f, begin, num);
132  }
133 
135  template<typename F>
138  F func;
139 
140  forall_children_functor(const LinearQuadtree& t, F f) : tree(t), func(f) { }
141 
142  inline void operator()(NodeID u) {
143  if (tree.isLeaf(u)) {
144  return;
145  }
146  for (uint32_t i = 0; i < tree.numberOfChilds(u); i++) {
147  func(tree.child(u, i));
148  }
149  }
150  };
151 
153  template<typename F>
155  return forall_children_functor<F>(*this, f);
156  }
157 
159  template<typename Func>
162  Func func;
163 
164  forall_points_functor(const LinearQuadtree& t, const Func& f) : tree(t), func(f) { }
165 
166  inline void operator()(NodeID u) {
169  for (PointID i = firstPoint; i < end; i++) {
170  func(i);
171  }
172  }
173  };
174 
176  template<typename Func>
177  inline forall_points_functor<Func> forall_points(const Func& func) const {
178  return forall_points_functor<Func>(*this, func);
179  }
180 
182  template<typename F>
185  F func;
186 
188  : tree(t), func(f) { }
189 
190  inline void operator()(NodeID u) {
191  if (tree.isLeaf(u)) {
192  return;
193  }
194  for (uint32_t i = 0; i < tree.numberOfChilds(u); i++) {
195  for (uint32_t j = i + 1; j < tree.numberOfChilds(u); j++) {
196  func(tree.child(u, i), tree.child(u, j));
197  }
198  }
199  }
200  };
201 
203  template<typename F>
206  }
207 
209  template<typename F, typename CondType = true_condition>
212  F func;
213  CondType cond;
214 
216 
217  top_down_traversal_functor(const LinearQuadtree& t, F f, CondType c)
218  : tree(t), func(f), cond(c) { }
219 
220  inline void operator()(NodeID u) {
221  if (cond(u)) {
222  func(u);
223  tree.forall_children (*this)(u);
224  };
225  }
226  };
227 
229  template<typename F>
231  return top_down_traversal_functor<F>(*this, f);
232  }
233 
235  template<typename F, typename Cond>
237  return top_down_traversal_functor<F, Cond>(*this, f, cond);
238  }
239 
241  template<typename F, typename CondType = true_condition>
244  F func;
245  CondType cond;
246 
248 
249  bottom_up_traversal_functor(const LinearQuadtree& t, F f, CondType c)
250  : tree(t), func(f), cond(c) { }
251 
252  inline void operator()(NodeID u) {
253  if (cond(u)) {
254  tree.forall_children (*this)(u);
255  func(u);
256  };
257  }
258  };
259 
261  template<typename F>
263  return bottom_up_traversal_functor<F>(*this, f);
264  }
265 
267  template<typename F, typename Cond>
269  return bottom_up_traversal_functor<F, Cond>(*this, f, cond);
270  }
271 
272  template<typename WSPairFuncType, typename DPairFuncType, typename DNodeFuncType,
273  typename BranchCondType = true_condition>
274  struct wspd_functor {
276  WSPairFuncType WSFunction;
277  DPairFuncType DPairFunction;
278  DNodeFuncType DNodeFunction;
279  BranchCondType BranchCondFunction;
280 
281  wspd_functor(const LinearQuadtree& t, WSPairFuncType& wsf, DPairFuncType& dpf,
282  DNodeFuncType& dnf)
283  : tree(t), WSFunction(wsf), DPairFunction(dpf), DNodeFunction(dnf) { }
284 
285  wspd_functor(const LinearQuadtree& t, WSPairFuncType& wsf, DPairFuncType& dpf,
286  DNodeFuncType& dnf, BranchCondType& bc)
287  : tree(t)
288  , WSFunction(wsf)
289  , DPairFunction(dpf)
290  , DNodeFunction(dnf)
291  , BranchCondFunction(bc) { }
292 
293  inline void operator()(NodeID u) {
294  if (BranchCondFunction(u)) {
296  if (tree.numberOfPoints(u) > 1) {
297  DNodeFunction(u);
298  }
299  } else {
300  tree.forall_children (*this)(u);
302  }
303  }
304  }
305 
306  inline void operator()(NodeID u, NodeID v) {
307  if (tree.isWS(u, v)) {
310  DPairFunction(u, v);
311  } else {
312  WSFunction(u, v);
313  }
314  } else {
317  || tree.isLeaf(u) || tree.isLeaf(v)) {
318  DPairFunction(u, v);
319  } else {
320  if (tree.level(u) >= tree.level(v)) {
321  tree.forall_children(pair_call(*this, v))(u);
322  } else {
323  tree.forall_children(pair_call(*this, u))(v);
324  }
325  }
326  }
327  }
328  };
329 
330  template<typename A, typename B, typename C, typename ConditionType>
332  ConditionType cond) {
333  return wspd_functor<A, B, C, ConditionType>(*this, a, b, c, cond);
334  }
335 
336  template<typename A, typename B, typename C>
338  return wspd_functor<A, B, C>(*this, a, b, c);
339  }
340 
343 
345 
346  inline void operator()(NodeID a, NodeID b) { tree.addWSPD(a, b); }
347  };
348 
350 
353 
355 
356  inline void operator()(NodeID a, NodeID b) { tree.addDirectPair(a, b); }
357  };
358 
360  return StoreDirectPairFunctor(*this);
361  }
362 
365 
367 
368  inline void operator()(NodeID a) { tree.addDirect(a); }
369  };
370 
372  return StoreDirectNodeFunctor(*this);
373  }
374 
375  inline NodeID level(NodeID nodeID) const { return m_tree[nodeID].level; }
376 
377  inline NodeID nextNode(NodeID nodeID) const { return m_tree[nodeID].next; }
378 
379  inline void setNextNode(NodeID nodeID, NodeID next) { m_tree[nodeID].next = next; }
380 
381  inline void setLevel(NodeID nodeID, uint32_t level) { m_tree[nodeID].level = level; }
382 
383  inline PointID firstPoint(NodeID nodeID) const { return m_tree[nodeID].firstPoint; }
384 
385  inline void setFirstPoint(NodeID nodeID, PointID firstPoint) {
386  m_tree[nodeID].firstPoint = firstPoint;
387  }
388 
389  inline LQPoint& point(PointID pointID) { return m_points[pointID]; }
390 
391  inline const LQPoint& point(PointID pointID) const { return m_points[pointID]; }
392 
393  inline MortonNR mortonNr(PointID point) const { return m_points[point].mortonNr; }
394 
398  inline uint32_t numberOfChilds(NodeID nodeID) const { return m_tree[nodeID].numChilds; }
399 
401  inline void setNumberOfChilds(NodeID nodeID, uint32_t numChilds) {
402  m_tree[nodeID].numChilds = numChilds;
403  }
404 
406  inline NodeID child(NodeID nodeID, uint32_t i) const { return m_tree[nodeID].child[i]; }
407 
409  inline void setChild(NodeID nodeID, uint32_t i, NodeID c) { m_tree[nodeID].child[i] = c; }
410 
412  inline bool isLeaf(NodeID nodeID) const { return !m_tree[nodeID].numChilds; }
413 
415  inline bool isFence(NodeID nodeID) const { return m_tree[nodeID].fence; }
416 
418  inline uint32_t numberOfPoints(NodeID nodeID) const { return m_tree[nodeID].numPoints; }
419 
421  inline void setNumberOfPoints(NodeID nodeID, uint32_t numPoints) {
422  m_tree[nodeID].numPoints = numPoints;
423  }
424 
426  inline NodeID root() const { return m_root; }
427 
429  inline uint32_t numberOfPoints() const { return m_numPoints; }
430 
432  inline uint32_t numberOfNodes() const { return m_numInnerNodes + m_numLeaves; }
433 
435  inline uint32_t maxNumberOfNodes() const { return m_maxNumNodes; }
436 
438  void clear();
439 
441  LinearQuadtree(uint32_t n, float* origXPos, float* origYPos, float* origSize);
442 
444  ~LinearQuadtree(void);
445 
446  uint64_t sizeInBytes() const;
447 
448  inline NodeID pointLeaf(PointID point) const { return m_points[point].node; }
449 
450  inline void setPointLeaf(PointID point, NodeID leaf) { m_points[point].node = leaf; }
451 
452  inline float pointX(PointID point) const { return m_pointXPos[point]; }
453 
454  inline float pointY(PointID point) const { return m_pointYPos[point]; }
455 
456  inline float pointSize(PointID point) const { return m_pointSize[point]; }
457 
458  inline float* pointX() const { return m_pointXPos; }
459 
460  inline float* pointY() const { return m_pointYPos; }
461 
462  inline float* pointSize() const { return m_pointSize; }
463 
464  inline float nodeX(NodeID nodeID) const { return m_nodeXPos[nodeID]; }
465 
466  inline void setNodeX(NodeID nodeID, float x) { m_nodeXPos[nodeID] = x; }
467 
468  inline float nodeY(NodeID nodeID) const { return m_nodeYPos[nodeID]; }
469 
470  inline void setNodeY(NodeID nodeID, float y) { m_nodeYPos[nodeID] = y; }
471 
472  inline float nodeSize(NodeID nodeID) const { return m_nodeSize[nodeID]; }
473 
474  inline void setNodeSize(NodeID nodeID, float size) { m_nodeSize[nodeID] = size; }
475 
476  void setPoint(PointID id, float x, float y, uint32_t ref) {
477  m_pointXPos[id] = x;
478  m_pointYPos[id] = y;
479  m_points[id].ref = ref;
480  }
481 
483  uint32_t ref = m_points[id].ref;
484  m_pointXPos[id] = m_origXPos[ref];
485  m_pointYPos[id] = m_origYPos[ref];
486  m_pointSize[id] = m_origSize[ref];
487  }
488 
489  void setPoint(PointID id, float x, float y, float r, uint32_t ref) {
490  m_pointXPos[id] = x;
491  m_pointYPos[id] = y;
492  m_pointSize[id] = r;
493  m_points[id].ref = ref;
494  }
495 
496  void setPoint(PointID id, float x, float y, float r) {
497  m_pointXPos[id] = x;
498  m_pointYPos[id] = y;
499  m_pointSize[id] = r;
500  }
501 
502  inline uint32_t refOfPoint(PointID id) const { return m_points[id].ref; }
503 
504  inline NodeID nodeOfPoint(PointID id) const { return m_points[id].node; }
505 
506  inline void nodeFence(NodeID nodeID) { m_tree[nodeID].fence = true; }
507 
508  inline bool isWS(NodeID a, NodeID b) const {
509  float s = 0.00000001f;
510  float dx = nodeX(a) - nodeX(b);
511  float dy = nodeY(a) - nodeY(b);
512  float d_sq = dx * dx + dy * dy;
513  float size = max(nodeSize(a), nodeSize(b));
514  return d_sq > (s * 0.5 + 1) * (s * 0.5 + 1) * 2 * size * size;
515  }
516 
517  void computeWSPD();
518 
519  void computeWSPD(NodeID n);
520 
521  inline NodeID firstInnerNode() const { return m_firstInner; }
522 
523  inline uint32_t numberOfInnerNodes() const { return m_numInnerNodes; }
524 
525  inline NodeID firstLeaf() const { return m_firstLeaf; }
526 
527  inline uint32_t numberOfLeaves() const { return m_numLeaves; }
528 
529  uint32_t numberOfWSP() const { return m_numWSP; }
530 
531  uint32_t numberOfDirectPairs() const { return m_numNotWSP; }
532 
533  uint32_t numberOfDirectNodes() const { return m_numDirectNodes; }
534 
535  inline NodeID directNode(uint32_t i) const { return m_directNodes[i]; }
536 
537  inline NodeID directNodeA(uint32_t i) const { return m_notWspd[i].a; }
538 
539  inline NodeID directNodeB(uint32_t i) const { return m_notWspd[i].b; }
540 
541  WSPD* wspd() const { return m_WSPD; };
542 
543  void init(float min_x, float min_y, float max_x, float max_y);
544 
545  inline float minX() const { return m_min_x; }
546 
547  inline float minY() const { return m_min_y; }
548 
549  inline float maxX() const { return m_max_x; }
550 
551  inline float maxY() const { return m_max_y; }
552 
553  inline double scaleInv() const { return m_scaleInv; }
554 
555  inline void computeCoords(NodeID nodeIndex) {
556  uint32_t ix, iy;
557  uint32_t level = this->level(nodeIndex);
558  float s = (float)(m_cellSize * (1 << level));
559  this->setNodeSize(nodeIndex, s);
560  MortonNR mnr = this->mortonNr(this->firstPoint(nodeIndex));
561  mnr = mnr >> (level * 2);
562  mnr = mnr << (level * 2);
563  mortonNumberInv<uint64_t, uint32_t>(mnr, ix, iy);
564  this->setNodeX(nodeIndex,
565  (float)((m_sideLengthPoints * ((float)ix) - 0.5) / m_sideLengthGrid + (float)m_min_x
566  + (float)s * 0.5f));
567  this->setNodeY(nodeIndex,
568  (float)((m_sideLengthPoints * ((float)iy) - 0.5) / m_sideLengthGrid + (float)m_min_y
569  + (float)s * 0.5f));
570  }
571 
572  LQPoint* pointArray() { return m_points; }
573 
574  PointID findFirstPointInCell(PointID somePointInCell) const;
575 
576 private:
578  void allocate(uint32_t n);
579 
581  void deallocate();
582 
583  inline void initLeaf(NodeID leaf, PointID firstPoint, uint32_t numPoints, NodeID next) {
584  m_tree[leaf].numChilds = 0;
585  m_tree[leaf].next = next;
586  m_tree[leaf].fence = 0;
587  m_tree[leaf].level = 0;
588  m_tree[leaf].firstPoint = firstPoint;
589  m_tree[leaf].numPoints = numPoints;
590  }
591 
592  inline void initInnerNode(NodeID nodeID, NodeID leftChild, NodeID rightChild, uint32_t level,
593  NodeID next) {
594  m_tree[nodeID].numChilds = 2;
595  m_tree[nodeID].child[0] = leftChild;
596  m_tree[nodeID].child[1] = rightChild;
597  m_tree[nodeID].next = next;
598  m_tree[nodeID].fence = 0;
599  m_tree[nodeID].level = level;
600  m_tree[nodeID].firstPoint = leftChild;
601  m_tree[nodeID].numPoints = rightChild - leftChild;
602  }
603 
605  inline void nodeAppendChild(NodeID nodeID, NodeID child) {
606  m_tree[nodeID].child[m_tree[nodeID].numChilds++] = child;
607  m_tree[nodeID].numPoints += m_tree[child].numPoints;
608  }
609 
611  inline void leafAppendPoint(NodeID leaf, PointID point) {
612  m_points[point].node = leaf;
613  m_tree[leaf].numPoints++;
614  }
615 
617  void addWSPD(NodeID s, NodeID t);
618 
620  void addDirectPair(NodeID s, NodeID t);
621 
623  void addDirect(NodeID s);
624 
626  float m_min_x;
627 
629  float m_min_y;
630 
632  float m_max_x;
633 
635  float m_max_y;
636 
638  double m_cellSize;
639 
641  double m_scaleInv;
642 
645 
648 
650  float* m_origXPos;
651 
653  float* m_origYPos;
654 
656  float* m_origSize;
657 
659  float* m_pointXPos;
660 
662  float* m_pointYPos;
663 
665  float* m_pointSize;
666 
668  float* m_nodeXPos;
669 
670 
672  float* m_nodeYPos;
673 
675  float* m_nodeSize;
676 
679 
681  uint32_t m_maxNumNodes;
682 
685 
687  uint32_t m_numPoints;
688 
689  uint32_t m_numWSP;
690 
692  uint32_t m_numNotWSP;
693 
696 
699 
702 
705 
707  uint32_t m_numLeaves;
708 
711 
713  uint32_t m_numInnerNodes;
714 };
715 
717  return a.mortonNr < b.mortonNr;
718 }
719 
720 }
721 }
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children_functor::func
F func
Definition: LinearQuadtree.h:185
ogdf::fast_multipole_embedder::LinearQuadtree::minX
float minX() const
Definition: LinearQuadtree.h:545
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectNodeFunctor::operator()
void operator()(NodeID a)
Definition: LinearQuadtree.h:368
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectPairFunctor
Definition: LinearQuadtree.h:351
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:184
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor
top down traversal of the subtree of a given node
Definition: LinearQuadtree.h:210
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfNodes
uint32_t numberOfNodes() const
returns the number of nodes in this tree
Definition: LinearQuadtree.h:432
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:220
ogdf::fast_multipole_embedder::LinearQuadtree::NodeID
unsigned int NodeID
Definition: LinearQuadtree.h:55
ogdf::fast_multipole_embedder::LinearQuadtree::m_notWspd
LQWSPair * m_notWspd
Definition: LinearQuadtree.h:691
ogdf::fast_multipole_embedder::LinearQuadtree::findFirstPointInCell
PointID findFirstPointInCell(PointID somePointInCell) const
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfDirectNodes
uint32_t numberOfDirectNodes() const
Definition: LinearQuadtree.h:533
ogdf::fast_multipole_embedder::LinearQuadtree::setNumberOfPoints
void setNumberOfPoints(NodeID nodeID, uint32_t numPoints)
sets the number of nodes containted in node nodeID
Definition: LinearQuadtree.h:421
ogdf::fast_multipole_embedder::LinearQuadtree::StoreWSPairFunction
StoreWSPairFunctor StoreWSPairFunction()
Definition: LinearQuadtree.h:349
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal
top_down_traversal_functor< F > top_down_traversal(F f) const
creator
Definition: LinearQuadtree.h:230
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::fence
bool fence
Definition: LinearQuadtree.h:73
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::bottom_up_traversal_functor
bottom_up_traversal_functor(const LinearQuadtree &t, F f, CondType c)
Definition: LinearQuadtree.h:249
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:190
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points_functor::forall_points_functor
forall_points_functor(const LinearQuadtree &t, const Func &f)
Definition: LinearQuadtree.h:164
ogdf::fast_multipole_embedder::LinearQuadtree::directNode
NodeID directNode(uint32_t i) const
Definition: LinearQuadtree.h:535
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:243
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children
forall_children_functor< F > forall_children(F f) const
creator
Definition: LinearQuadtree.h:154
ogdf::fast_multipole_embedder::LinearQuadtree::nodeOfPoint
NodeID nodeOfPoint(PointID id) const
Definition: LinearQuadtree.h:504
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor
Definition: LinearQuadtree.h:274
ogdf::fast_multipole_embedder::LinearQuadtree::firstInnerNode
NodeID firstInnerNode() const
Definition: LinearQuadtree.h:521
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::operator()
void operator()(NodeID u, NodeID v)
Definition: LinearQuadtree.h:306
ogdf::fast_multipole_embedder::LinearQuadtree::addWSPD
void addWSPD(NodeID s, NodeID t)
adds a well-separated pair to the wspd
ogdf::fast_multipole_embedder::LinearQuadtree::m_tree
LQNode * m_tree
the main tree array containing all nodes (including leaves)
Definition: LinearQuadtree.h:678
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points_functor
simple functor for iterating over all points of a node
Definition: LinearQuadtree.h:160
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:142
ogdf::fast_multipole_embedder::WSPD
Class for the Well-Separated-Pairs-Decomposition (WSPD)
Definition: WSPD.h:43
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfInnerNodes
uint32_t numberOfInnerNodes() const
Definition: LinearQuadtree.h:523
ogdf::begin
HypergraphRegistry< HypernodeElement >::iterator begin(const HypergraphRegistry< HypernodeElement > &self)
ogdf::fast_multipole_embedder::LinearQuadtree::forall_well_separated_pairs
wspd_functor< A, B, C, ConditionType > forall_well_separated_pairs(A a, B b, C c, ConditionType cond)
Definition: LinearQuadtree.h:331
ogdf::fast_multipole_embedder::LinearQuadtree::nodeX
float nodeX(NodeID nodeID) const
Definition: LinearQuadtree.h:464
ogdf::fast_multipole_embedder::LinearQuadtree::scaleInv
double scaleInv() const
Definition: LinearQuadtree.h:553
ogdf::fast_multipole_embedder::LinearQuadtree::is_leaf_condition_functor::operator()
bool operator()(NodeID u)
Definition: LinearQuadtree.h:100
ogdf::fast_multipole_embedder::LinearQuadtree::computeCoords
void computeCoords(NodeID nodeIndex)
Definition: LinearQuadtree.h:555
ogdf::fast_multipole_embedder::pair_call
static pair_call_functor< F, A > pair_call(F f, A a)
creates a pair call resulting in a call f(a, *)
Definition: FMEFunctional.h:153
ogdf::fast_multipole_embedder::LinearQuadtree::LQWSPair::LQWSPair
LQWSPair(NodeID c, NodeID d)
Definition: LinearQuadtree.h:77
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfDirectPairs
uint32_t numberOfDirectPairs() const
Definition: LinearQuadtree.h:531
ogdf::fast_multipole_embedder::LinearQuadtree::isFence
bool isFence(NodeID nodeID) const
sets the fence flag for node nodeID
Definition: LinearQuadtree.h:415
ogdf::fast_multipole_embedder::LinearQuadtree::setNumberOfChilds
void setNumberOfChilds(NodeID nodeID, uint32_t numChilds)
sets the number of children of a node
Definition: LinearQuadtree.h:401
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:293
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::func
F func
Definition: LinearQuadtree.h:212
ogdf::fast_multipole_embedder::LinearQuadtree::nextNode
NodeID nextNode(NodeID nodeID) const
Definition: LinearQuadtree.h:377
ogdf::fast_multipole_embedder::LinearQuadtree::m_pointSize
float * m_pointSize
point size in tree order
Definition: LinearQuadtree.h:665
ogdf::fast_multipole_embedder::LinearQuadtree::is_leaf_condition_functor
Definition: LinearQuadtree.h:95
ogdf::fast_multipole_embedder::LinearQuadtree::m_numNotWSP
uint32_t m_numNotWSP
Definition: LinearQuadtree.h:692
ogdf::fast_multipole_embedder::LinearQuadtree::sizeInBytes
uint64_t sizeInBytes() const
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes
forall_tree_nodes_functor< F > forall_tree_nodes(F f, NodeID begin, uint32_t num) const
creator
Definition: LinearQuadtree.h:130
ogdf::fast_multipole_embedder::LinearQuadtree::LinearQuadtreeBuilderList
friend class LinearQuadtreeBuilderList
Definition: LinearQuadtree.h:52
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::cond
CondType cond
Definition: LinearQuadtree.h:213
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectNodeFunctor::StoreDirectNodeFunctor
StoreDirectNodeFunctor(LinearQuadtree &t)
Definition: LinearQuadtree.h:366
ogdf::fast_multipole_embedder::LinearQuadtreeBuilder
the builder for the LinearQuadtree
Definition: LinearQuadtreeBuilder.h:43
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:111
ogdf::fast_multipole_embedder::LinearQuadtree::pointSize
float pointSize(PointID point) const
Definition: LinearQuadtree.h:456
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::operator()
void operator()()
Definition: LinearQuadtree.h:119
ogdf::fast_multipole_embedder::LinearQuadtree::addDirect
void addDirect(NodeID s)
add a direct node to the array list of direct nodes
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::numChilds
uint32_t numChilds
Definition: LinearQuadtree.h:70
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfLeaves
uint32_t numberOfLeaves() const
Definition: LinearQuadtree.h:527
ogdf::fast_multipole_embedder::LinearQuadtree::nodeY
float nodeY(NodeID nodeID) const
Definition: LinearQuadtree.h:468
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::top_down_traversal_functor
top_down_traversal_functor(const LinearQuadtree &t, F f, CondType c)
Definition: LinearQuadtree.h:217
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::func
F func
Definition: LinearQuadtree.h:112
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::WSFunction
WSPairFuncType WSFunction
Definition: LinearQuadtree.h:276
ogdf::fast_multipole_embedder::LinearQuadtree::initLeaf
void initLeaf(NodeID leaf, PointID firstPoint, uint32_t numPoints, NodeID next)
Definition: LinearQuadtree.h:583
ogdf::fast_multipole_embedder::LinearQuadtree::StoreWSPairFunctor::StoreWSPairFunctor
StoreWSPairFunctor(LinearQuadtree &t)
Definition: LinearQuadtree.h:344
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfPoints
uint32_t numberOfPoints(NodeID nodeID) const
returns the number of points contained in the subtree of node nodeID
Definition: LinearQuadtree.h:418
ogdf::fast_multipole_embedder::LinearQuadtree::allocate
void allocate(uint32_t n)
helper function for allocating the array's
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectNodeFunction
StoreDirectNodeFunctor StoreDirectNodeFunction()
Definition: LinearQuadtree.h:371
ogdf::fast_multipole_embedder::LinearQuadtree::LQPoint::mortonNr
MortonNR mortonNr
Definition: LinearQuadtree.h:60
ogdf::fast_multipole_embedder::LinearQuadtree::setPointLeaf
void setPointLeaf(PointID point, NodeID leaf)
Definition: LinearQuadtree.h:450
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectNodeFunctor::tree
LinearQuadtree & tree
Definition: LinearQuadtree.h:364
ogdf::fast_multipole_embedder::LinearQuadtree::m_nodeXPos
float * m_nodeXPos
node x coord
Definition: LinearQuadtree.h:668
FastUtils.h
Definition of utility functions for FME layout.
ogdf::fast_multipole_embedder::LinearQuadtree::m_origSize
float * m_origSize
point size in graph order
Definition: LinearQuadtree.h:656
ogdf::fast_multipole_embedder::LinearQuadtree::isWS
bool isWS(NodeID a, NodeID b) const
Definition: LinearQuadtree.h:508
ogdf::fast_multipole_embedder::LinearQuadtree::setFirstPoint
void setFirstPoint(NodeID nodeID, PointID firstPoint)
Definition: LinearQuadtree.h:385
ogdf::fast_multipole_embedder::LinearQuadtree::setPoint
void setPoint(PointID id, float x, float y, float r, uint32_t ref)
Definition: LinearQuadtree.h:489
ogdf::fast_multipole_embedder::LinearQuadtree::m_origXPos
float * m_origXPos
point x coord in graph order
Definition: LinearQuadtree.h:650
ogdf::fast_multipole_embedder::LinearQuadtree::firstPoint
PointID firstPoint(NodeID nodeID) const
Definition: LinearQuadtree.h:383
ogdf::fast_multipole_embedder::LinearQuadtree::is_fence_condition
is_fence_condition_functor is_fence_condition() const
creator
Definition: LinearQuadtree.h:91
ogdf::fast_multipole_embedder::LinearQuadtree::pointLeaf
NodeID pointLeaf(PointID point) const
Definition: LinearQuadtree.h:448
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children_functor::forall_ordered_pairs_of_children_functor
forall_ordered_pairs_of_children_functor(const LinearQuadtree &t, F f)
Definition: LinearQuadtree.h:187
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal
bottom_up_traversal_functor< F, Cond > bottom_up_traversal(F f, Cond cond) const
creator
Definition: LinearQuadtree.h:268
ogdf::fast_multipole_embedder::LinearQuadtree::is_leaf_condition_functor::is_leaf_condition_functor
is_leaf_condition_functor(const LinearQuadtree &t)
Definition: LinearQuadtree.h:98
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:166
ogdf::fast_multipole_embedder::LinearQuadtree::m_scaleInv
double m_scaleInv
the inverse scale to transform
Definition: LinearQuadtree.h:641
ogdf::fast_multipole_embedder::LinearQuadtree::LQPoint::node
uint32_t node
Definition: LinearQuadtree.h:61
ogdf::fast_multipole_embedder::LinearQuadtree::nodeSize
float nodeSize(NodeID nodeID) const
Definition: LinearQuadtree.h:472
OGDF_LQ_WSPD_BOUND
#define OGDF_LQ_WSPD_BOUND
Definition: LinearQuadtree.h:43
ogdf::fast_multipole_embedder::LinearQuadtree::child
NodeID child(NodeID nodeID, uint32_t i) const
returns the i th child index of node nodeID
Definition: LinearQuadtree.h:406
ogdf::fast_multipole_embedder::LinearQuadtree::m_maxNumNodes
uint32_t m_maxNumNodes
the maximum number of nodes (2*n here instead of 2*n-1)
Definition: LinearQuadtree.h:681
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children_functor::func
F func
Definition: LinearQuadtree.h:138
ogdf::fast_multipole_embedder::LinearQuadtree::pointY
float * pointY() const
Definition: LinearQuadtree.h:460
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::cond
CondType cond
Definition: LinearQuadtree.h:245
ogdf::fast_multipole_embedder::LinearQuadtree::LQPoint::ref
uint32_t ref
Definition: LinearQuadtree.h:62
ogdf::fast_multipole_embedder::const_condition
condition functor for returning a constant boolean value
Definition: FMEFunctional.h:53
r
int r[]
Definition: hierarchical-ranking.cpp:13
ogdf::fast_multipole_embedder::LinearQuadtree::m_nodeSize
float * m_nodeSize
node size
Definition: LinearQuadtree.h:675
ogdf::fast_multipole_embedder::LinearQuadtree::is_leaf_condition
is_leaf_condition_functor is_leaf_condition() const
creator
Definition: LinearQuadtree.h:104
ogdf::fast_multipole_embedder::LinearQuadtree::pointX
float pointX(PointID point) const
Definition: LinearQuadtree.h:452
ogdf::fast_multipole_embedder::LinearQuadtree::m_nodeYPos
float * m_nodeYPos
node y coord
Definition: LinearQuadtree.h:672
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::numPoints
uint32_t numPoints
Definition: LinearQuadtree.h:72
ogdf::fast_multipole_embedder::LinearQuadtree::m_min_y
float m_min_y
the y coordinate of the bottom most point
Definition: LinearQuadtree.h:629
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectPairFunction
StoreDirectPairFunctor StoreDirectPairFunction()
Definition: LinearQuadtree.h:359
OGDF_LQ_M2L_MIN_BOUND
#define OGDF_LQ_M2L_MIN_BOUND
Definition: LinearQuadtree.h:41
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::forall_tree_nodes_functor
forall_tree_nodes_functor(const LinearQuadtree &t, F f, NodeID b, uint32_t num)
Definition: LinearQuadtree.h:116
ogdf::fast_multipole_embedder::LinearQuadtree::is_leaf_condition_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:96
ogdf::fast_multipole_embedder::MortonNR
uint64_t MortonNR
Definition: FastUtils.h:75
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal
top_down_traversal_functor< F, Cond > top_down_traversal(F f, Cond cond) const
creator
Definition: LinearQuadtree.h:236
ogdf::fast_multipole_embedder::LinearQuadtree::init
void init(float min_x, float min_y, float max_x, float max_y)
ogdf::fast_multipole_embedder::LinearQuadtree::m_numPoints
uint32_t m_numPoints
number of points this quadtree is based on
Definition: LinearQuadtree.h:687
ogdf::fast_multipole_embedder::LinearQuadtree::firstLeaf
NodeID firstLeaf() const
Definition: LinearQuadtree.h:525
ogdf::fast_multipole_embedder::LinearQuadtree::is_fence_condition_functor::is_fence_condition_functor
is_fence_condition_functor(const LinearQuadtree &t)
Definition: LinearQuadtree.h:85
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:211
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::BranchCondFunction
BranchCondType BranchCondFunction
Definition: LinearQuadtree.h:279
ogdf::fast_multipole_embedder::LinearQuadtree::point
const LQPoint & point(PointID pointID) const
Definition: LinearQuadtree.h:391
ogdf::fast_multipole_embedder::LinearQuadtree::m_max_x
float m_max_x
the x coordinate of the right most point
Definition: LinearQuadtree.h:632
ogdf::fast_multipole_embedder::LinearQuadtree::setNodeX
void setNodeX(NodeID nodeID, float x)
Definition: LinearQuadtree.h:466
ogdf::fast_multipole_embedder::LinearQuadtree::leafAppendPoint
void leafAppendPoint(NodeID leaf, PointID point)
appends an successing point by simply increasing childcount of a leaf. Assumes isLeaf
Definition: LinearQuadtree.h:611
ogdf::fast_multipole_embedder::LinearQuadtree::LQWSPair
Definition: LinearQuadtree.h:76
ogdf::fast_multipole_embedder::LinearQuadtree::m_numLeaves
uint32_t m_numLeaves
number of leaves in the chain
Definition: LinearQuadtree.h:707
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points
forall_points_functor< Func > forall_points(const Func &func) const
creator
Definition: LinearQuadtree.h:177
ogdf::fast_multipole_embedder::LinearQuadtree::LQPoint
Definition: LinearQuadtree.h:58
ogdf::fast_multipole_embedder::LinearQuadtree::pointY
float pointY(PointID point) const
Definition: LinearQuadtree.h:454
ogdf::fast_multipole_embedder::LinearQuadtree::top_down_traversal_functor::top_down_traversal_functor
top_down_traversal_functor(const LinearQuadtree &t, F f)
Definition: LinearQuadtree.h:215
ogdf::fast_multipole_embedder::LinearQuadtree::pointArray
LQPoint * pointArray()
Definition: LinearQuadtree.h:572
ogdf::fast_multipole_embedder::LinearQuadtree::point
LQPoint & point(PointID pointID)
Definition: LinearQuadtree.h:389
ogdf::fast_multipole_embedder::LinearQuadtree::level
NodeID level(NodeID nodeID) const
Definition: LinearQuadtree.h:375
ogdf::fast_multipole_embedder::LinearQuadtree::setNodeY
void setNodeY(NodeID nodeID, float y)
Definition: LinearQuadtree.h:470
ogdf::fast_multipole_embedder::LinearQuadtree::wspd
WSPD * wspd() const
Definition: LinearQuadtree.h:541
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::firstPoint
PointID firstPoint
Definition: LinearQuadtree.h:71
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::operator()
void operator()(NodeID u)
Definition: LinearQuadtree.h:252
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal
bottom_up_traversal_functor< F > bottom_up_traversal(F f) const
creator
Definition: LinearQuadtree.h:262
ogdf::fast_multipole_embedder::LinearQuadtree::m_numWSP
uint32_t m_numWSP
Definition: LinearQuadtree.h:689
ogdf::fast_multipole_embedder::LinearQuadtree::initInnerNode
void initInnerNode(NodeID nodeID, NodeID leftChild, NodeID rightChild, uint32_t level, NodeID next)
Definition: LinearQuadtree.h:592
ogdf::fast_multipole_embedder::LinearQuadtree::nodeAppendChild
void nodeAppendChild(NodeID nodeID, NodeID child)
appends one child index. Assumes childCount < 4 and not leaf
Definition: LinearQuadtree.h:605
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectPairFunctor::tree
LinearQuadtree & tree
Definition: LinearQuadtree.h:352
ogdf::fast_multipole_embedder::LinearQuadtree::minY
float minY() const
Definition: LinearQuadtree.h:547
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children_functor::forall_children_functor
forall_children_functor(const LinearQuadtree &t, F f)
Definition: LinearQuadtree.h:140
ogdf::fast_multipole_embedder::LQPointComparer
bool LQPointComparer(const LinearQuadtree::LQPoint &a, const LinearQuadtree::LQPoint &b)
Definition: LinearQuadtree.h:716
ogdf::fast_multipole_embedder::LinearQuadtree::LQWSPair::a
NodeID a
Definition: LinearQuadtree.h:77
ogdf::fast_multipole_embedder::LinearQuadtree::m_numInnerNodes
uint32_t m_numInnerNodes
number of inner nodes in the chain
Definition: LinearQuadtree.h:713
ogdf::fast_multipole_embedder::LinearQuadtree::maxY
float maxY() const
Definition: LinearQuadtree.h:551
ogdf::fast_multipole_embedder::LinearQuadtree::m_cellSize
double m_cellSize
the height and width of a grid cell
Definition: LinearQuadtree.h:638
ogdf::fast_multipole_embedder::LinearQuadtree::setChild
void setChild(NodeID nodeID, uint32_t i, NodeID c)
sets the i th child index of node nodeID
Definition: LinearQuadtree.h:409
ogdf::fast_multipole_embedder::LinearQuadtree::m_directNodes
NodeID * m_directNodes
Definition: LinearQuadtree.h:694
ogdf::fast_multipole_embedder::LinearQuadtree::m_firstInner
NodeID m_firstInner
first inner node in the inner node chain
Definition: LinearQuadtree.h:710
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::wspd_functor
wspd_functor(const LinearQuadtree &t, WSPairFuncType &wsf, DPairFuncType &dpf, DNodeFuncType &dnf)
Definition: LinearQuadtree.h:281
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor
simple functor for iterating over all nodes
Definition: LinearQuadtree.h:110
ogdf::fast_multipole_embedder::LinearQuadtree::StoreWSPairFunctor
Definition: LinearQuadtree.h:341
ogdf::fast_multipole_embedder::LinearQuadtree::addDirectPair
void addDirectPair(NodeID s, NodeID t)
add a direct pair to the array list of direct pairs
ogdf::fast_multipole_embedder::LinearQuadtree::is_fence_condition_functor::operator()
bool operator()(NodeID u)
Definition: LinearQuadtree.h:87
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::numNodes
uint32_t numNodes
Definition: LinearQuadtree.h:114
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children_functor
functor for iterating over all ordered pairs of children of a node
Definition: LinearQuadtree.h:183
ogdf::fast_multipole_embedder::LinearQuadtree::setNextNode
void setNextNode(NodeID nodeID, NodeID next)
Definition: LinearQuadtree.h:379
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::DPairFunction
DPairFuncType DPairFunction
Definition: LinearQuadtree.h:277
ogdf::fast_multipole_embedder::LinearQuadtree
Definition: LinearQuadtree.h:50
ogdf::fast_multipole_embedder::LinearQuadtree::PointID
unsigned int PointID
Definition: LinearQuadtree.h:56
ogdf::fast_multipole_embedder::LinearQuadtree::m_max_y
float m_max_y
the y coordinate of the top most point
Definition: LinearQuadtree.h:635
ogdf::fast_multipole_embedder::LinearQuadtree::~LinearQuadtree
~LinearQuadtree(void)
destructor. tree mem will be released
ogdf::fast_multipole_embedder::LinearQuadtree::StoreWSPairFunctor::operator()
void operator()(NodeID a, NodeID b)
Definition: LinearQuadtree.h:346
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:161
ogdf::fast_multipole_embedder::LinearQuadtree::m_origYPos
float * m_origYPos
point y coord in graph order
Definition: LinearQuadtree.h:653
ogdf::fast_multipole_embedder::LinearQuadtree::pointX
float * pointX() const
Definition: LinearQuadtree.h:458
ogdf::fast_multipole_embedder::LinearQuadtree::computeWSPD
void computeWSPD()
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfWSP
uint32_t numberOfWSP() const
Definition: LinearQuadtree.h:529
ogdf::fast_multipole_embedder::LinearQuadtree::is_fence_condition_functor
Definition: LinearQuadtree.h:82
ogdf::fast_multipole_embedder::LinearQuadtree::m_sideLengthPoints
double m_sideLengthPoints
the maximum of height and width
Definition: LinearQuadtree.h:644
ogdf::fast_multipole_embedder::LinearQuadtree::isLeaf
bool isLeaf(NodeID nodeID) const
returns true if the given node index is a leaf
Definition: LinearQuadtree.h:412
ogdf::fast_multipole_embedder::LinearQuadtree::LQWSPair::b
NodeID b
Definition: LinearQuadtree.h:79
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:275
ogdf::fast_multipole_embedder::LinearQuadtree::m_pointXPos
float * m_pointXPos
point x coord in tree order
Definition: LinearQuadtree.h:659
basic.h
Basic declarations, included by all source files.
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::bottom_up_traversal_functor
bottom_up_traversal_functor(const LinearQuadtree &t, F f)
Definition: LinearQuadtree.h:247
OGDF_LQ_WSPD_BRANCH_BOUND
#define OGDF_LQ_WSPD_BRANCH_BOUND
Definition: LinearQuadtree.h:42
ogdf::end
HypergraphRegistry< HypernodeElement >::iterator end(const HypergraphRegistry< HypernodeElement > &self)
ogdf::fast_multipole_embedder::LinearQuadtree::deallocate
void deallocate()
helper function for releasing memory
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode
Definition: LinearQuadtree.h:65
ogdf::fast_multipole_embedder::LinearQuadtree::root
NodeID root() const
returns the index of the root
Definition: LinearQuadtree.h:426
ogdf::fast_multipole_embedder::LinearQuadtree::refOfPoint
uint32_t refOfPoint(PointID id) const
Definition: LinearQuadtree.h:502
ogdf::fast_multipole_embedder::LinearQuadtree::m_pointYPos
float * m_pointYPos
point y coord in tree order
Definition: LinearQuadtree.h:662
FMEFunctional.h
Definitions of functors used in FME layout.
ogdf::fast_multipole_embedder::LinearQuadtree::forall_tree_nodes_functor::begin
NodeID begin
Definition: LinearQuadtree.h:113
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor::func
F func
Definition: LinearQuadtree.h:244
ogdf::fast_multipole_embedder::LinearQuadtree::mortonNr
MortonNR mortonNr(PointID point) const
Definition: LinearQuadtree.h:393
ogdf::fast_multipole_embedder::LinearQuadtree::nodeFence
void nodeFence(NodeID nodeID)
Definition: LinearQuadtree.h:506
ogdf::fast_multipole_embedder::LinearQuadtree::m_points
LQPoint * m_points
the point order in tree order
Definition: LinearQuadtree.h:684
ogdf::fast_multipole_embedder::LinearQuadtree::m_min_x
float m_min_x
the x coordinate of the left most point
Definition: LinearQuadtree.h:626
ogdf::fast_multipole_embedder::LinearQuadtree::setPoint
void setPoint(PointID id, float x, float y, float r)
Definition: LinearQuadtree.h:496
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectPairFunctor::StoreDirectPairFunctor
StoreDirectPairFunctor(LinearQuadtree &t)
Definition: LinearQuadtree.h:354
ogdf::fast_multipole_embedder::LinearQuadtree::m_sideLengthGrid
double m_sideLengthGrid
the resulting side length of the grid (constant)
Definition: LinearQuadtree.h:647
ogdf::fast_multipole_embedder::LinearQuadtree::directNodeB
NodeID directNodeB(uint32_t i) const
Definition: LinearQuadtree.h:539
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::DNodeFunction
DNodeFuncType DNodeFunction
Definition: LinearQuadtree.h:278
ogdf::fast_multipole_embedder::LinearQuadtree::updatePointPositionSize
void updatePointPositionSize(PointID id)
Definition: LinearQuadtree.h:482
ogdf::fast_multipole_embedder::LinearQuadtree::StoreWSPairFunctor::tree
LinearQuadtree & tree
Definition: LinearQuadtree.h:342
ogdf::fast_multipole_embedder::LinearQuadtree::LinearQuadtree
LinearQuadtree(uint32_t n, float *origXPos, float *origYPos, float *origSize)
constructor. required tree mem will be allocated
ogdf::fast_multipole_embedder::LinearQuadtree::setLevel
void setLevel(NodeID nodeID, uint32_t level)
Definition: LinearQuadtree.h:381
ogdf::fast_multipole_embedder::LinearQuadtree::directNodeA
NodeID directNodeA(uint32_t i) const
Definition: LinearQuadtree.h:537
ogdf::fast_multipole_embedder::LinearQuadtree::m_firstLeaf
NodeID m_firstLeaf
first leaf in the leaf chain
Definition: LinearQuadtree.h:704
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectPairFunctor::operator()
void operator()(NodeID a, NodeID b)
Definition: LinearQuadtree.h:356
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfPoints
uint32_t numberOfPoints() const
returns the number of points in this tree
Definition: LinearQuadtree.h:429
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::level
uint32_t level
Definition: LinearQuadtree.h:67
ogdf::fast_multipole_embedder::LinearQuadtree::clear
void clear()
resets the tree
ogdf::fast_multipole_embedder::LinearQuadtree::StoreDirectNodeFunctor
Definition: LinearQuadtree.h:363
ogdf::fast_multipole_embedder::LinearQuadtree::m_root
NodeID m_root
the root of the tree
Definition: LinearQuadtree.h:701
ogdf::fast_multipole_embedder::LinearQuadtree::setPoint
void setPoint(PointID id, float x, float y, uint32_t ref)
Definition: LinearQuadtree.h:476
ogdf::fast_multipole_embedder::LinearQuadtree::is_fence_condition_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:83
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children_functor::tree
const LinearQuadtree & tree
Definition: LinearQuadtree.h:137
ogdf::fast_multipole_embedder::LinearQuadtree::maxX
float maxX() const
Definition: LinearQuadtree.h:549
ogdf::fast_multipole_embedder::LinearQuadtree::pointSize
float * pointSize() const
Definition: LinearQuadtree.h:462
ogdf::fast_multipole_embedder::LinearQuadtree::bottom_up_traversal_functor
bottom up traversal of the subtree of a given node
Definition: LinearQuadtree.h:242
ogdf::fast_multipole_embedder::LinearQuadtree::forall_children_functor
simple functor for iterating over all children of a node
Definition: LinearQuadtree.h:136
ogdf::fast_multipole_embedder::LinearQuadtree::maxNumberOfNodes
uint32_t maxNumberOfNodes() const
the upper bound for a compressed quadtree (2*numPoints)
Definition: LinearQuadtree.h:435
ogdf::fast_multipole_embedder::LinearQuadtree::forall_ordered_pairs_of_children
forall_ordered_pairs_of_children_functor< F > forall_ordered_pairs_of_children(F f) const
creator
Definition: LinearQuadtree.h:204
ogdf::fast_multipole_embedder::LinearQuadtree::wspd_functor::wspd_functor
wspd_functor(const LinearQuadtree &t, WSPairFuncType &wsf, DPairFuncType &dpf, DNodeFuncType &dnf, BranchCondType &bc)
Definition: LinearQuadtree.h:285
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::child
NodeID child[4]
Definition: LinearQuadtree.h:69
ogdf::fast_multipole_embedder::LinearQuadtree::setNodeSize
void setNodeSize(NodeID nodeID, float size)
Definition: LinearQuadtree.h:474
ogdf::fast_multipole_embedder::LinearQuadtree::m_WSPD
WSPD * m_WSPD
the wspd of this quadtree
Definition: LinearQuadtree.h:698
ogdf::fast_multipole_embedder::LinearQuadtree::LQNode::next
NodeID next
Definition: LinearQuadtree.h:68
ogdf::fast_multipole_embedder::LinearQuadtree::forall_points_functor::func
Func func
Definition: LinearQuadtree.h:162
ogdf::fast_multipole_embedder::LinearQuadtree::m_numDirectNodes
uint32_t m_numDirectNodes
Definition: LinearQuadtree.h:695
ogdf::fast_multipole_embedder::LinearQuadtree::forall_well_separated_pairs
wspd_functor< A, B, C > forall_well_separated_pairs(A a, B b, C c)
Definition: LinearQuadtree.h:337
ogdf::fast_multipole_embedder::LinearQuadtree::numberOfChilds
uint32_t numberOfChilds(NodeID nodeID) const
returns the number of children of node nodeID. for an inner node this is 1..4 and can be accessed by ...
Definition: LinearQuadtree.h:398