OGS
GeoLib::QuadTree< POINT > Class Template Reference

Detailed Description

template<typename POINT>
class GeoLib::QuadTree< POINT >

A quadtree is a rooted tree in which every internal node has four children. Every node corresponds to a square. (see Computational Geometry - Algorithms and Applications [Mark de Berg, Otfried Cheong, Marc van Kreveld, Mark Overmars] - Chapter 14)

One can instantiate the class template with a point type and a value for the maximal number of points per node. The point-type have to provide the access to its coordinates via operator[] and for debugging purposes operator<<)

Definition at line 27 of file QuadTree.h.

#include <QuadTree.h>

Public Types

enum class  Quadrant { NE = 0 , NW , SW , SE }

Public Member Functions

 QuadTree (POINT ll, POINT ur, std::size_t max_points_per_leaf)
 ~QuadTree ()
bool addPoint (POINT const *pnt)
void balance ()
void getLeafs (std::list< QuadTree< POINT > * > &leaf_list)
const std::vector< POINT const * > & getPoints () const
void getSquarePoints (POINT &ll, POINT &ur) const
void getLeaf (const POINT &pnt, POINT &ll, POINT &ur)
QuadTree< POINT > const * getFather () const
QuadTree< POINT > const * getChild (Quadrant quadrant) const
void getMaxDepth (std::size_t &max_depth) const
std::size_t getDepth () const

Private Member Functions

QuadTree< POINT > * getChild (Quadrant quadrant)
bool isLeaf () const
bool isChild (QuadTree< POINT > const *const tree, Quadrant quadrant) const
QuadTree< POINT > * getNorthNeighbor () const
QuadTree< POINT > * getSouthNeighbor () const
QuadTree< POINT > * getEastNeighbor () const
QuadTree< POINT > * getWestNeighbor () const
 QuadTree (POINT ll, POINT ur, QuadTree *father, std::size_t depth, std::size_t max_points_per_leaf)
void splitNode ()

Static Private Member Functions

static bool needToRefine (QuadTree< POINT > const *const node)

Private Attributes

QuadTree< POINT > * _father
std::array< QuadTree< POINT > *, 4 > _children
POINT _ll
POINT _ur
std::size_t _depth = 0
std::vector< POINT const * > _pnts
bool _is_leaf = true
const std::size_t _max_points_per_leaf

Member Enumeration Documentation

◆ Quadrant

template<typename POINT>
enum class GeoLib::QuadTree::Quadrant
strong
Enumerator
NE 

north east

NW 

north west

SW 

south west

SE 

south east

Definition at line 30 of file QuadTree.h.

31 {
32 NE = 0,
33 NW,
34 SW,
35 SE
36 };

Constructor & Destructor Documentation

◆ QuadTree() [1/2]

template<typename POINT>
GeoLib::QuadTree< POINT >::QuadTree ( POINT ll,
POINT ur,
std::size_t max_points_per_leaf )
inline

This is the constructor for class QuadTree. It takes two points (lower left and the upper right points).

Parameters
lllower left point of the square
urupper right point of the square
max_points_per_leafmaximum number of points per leaf

Definition at line 44 of file QuadTree.h.

45 : _father(nullptr),
49 {
51
52 if ((_ur[0] - _ll[0]) > (_ur[1] - _ll[1]))
53 {
54 _ur[1] = _ll[1] + _ur[0] - _ll[0];
55 }
56 else
57 {
58 _ur[0] = _ll[0] + _ur[1] - _ll[1];
59 }
60
61 DBUG(
62 "QuadTree(): lower left: ({:f},{:f},{:f}), upper right: "
63 "({:f},{:f},{:f}), depth: {:d}",
64 _ll[0],
65 _ll[1],
66 _ll[2],
67 _ur[0],
68 _ur[1],
69 _ur[2],
70 _depth);
71 }
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
QuadTree< POINT > * _father
Definition QuadTree.h:619
const std::size_t _max_points_per_leaf
Definition QuadTree.h:643
std::size_t _depth
Definition QuadTree.h:637

References _depth, _father, _ll, _max_points_per_leaf, _ur, DBUG(), and GeoLib::POINT.

Referenced by QuadTree(), balance(), getChild(), getChild(), getEastNeighbor(), getFather(), getLeafs(), getNorthNeighbor(), getSouthNeighbor(), getWestNeighbor(), isChild(), needToRefine(), and splitNode().

◆ ~QuadTree()

template<typename POINT>
GeoLib::QuadTree< POINT >::~QuadTree ( )
inline

destructor

Definition at line 76 of file QuadTree.h.

77 {
78 for (auto const& child : _children)
79 {
80 delete child;
81 }
82 }
std::array< QuadTree< POINT > *, 4 > _children
Definition QuadTree.h:627

References _children.

◆ QuadTree() [2/2]

template<typename POINT>
GeoLib::QuadTree< POINT >::QuadTree ( POINT ll,
POINT ur,
QuadTree< POINT > * father,
std::size_t depth,
std::size_t max_points_per_leaf )
inlineprivate

private constructor

Parameters
lllower left point
urupper right point
fatherfather in the tree
depthdepth of the node
max_points_per_leafmaximum number of points per leaf

Definition at line 484 of file QuadTree.h.

References QuadTree(), _depth, _father, _ll, _max_points_per_leaf, _ur, and GeoLib::POINT.

Member Function Documentation

◆ addPoint()

template<typename POINT>
bool GeoLib::QuadTree< POINT >::addPoint ( POINT const * pnt)
inline

This method adds the given point to the quadtree. If necessary, the quadtree will be extended.

Parameters
pntthe point
Returns
If the point can be inserted the method returns true, else false.

Definition at line 90 of file QuadTree.h.

91 {
92 if ((*pnt)[0] < _ll[0])
93 {
94 return false;
95 }
96 if ((*pnt)[0] >= _ur[0])
97 {
98 return false;
99 }
100 if ((*pnt)[1] < _ll[1])
101 {
102 return false;
103 }
104 if ((*pnt)[1] >= _ur[1])
105 {
106 return false;
107 }
108
109 if (!_is_leaf)
110 {
112 [&pnt](auto* child)
113 { return child->addPoint(pnt); });
114 }
115
116 // check if point is already in quadtree
117 bool pnt_in_quadtree(false);
118 for (std::size_t k(0); k < _pnts.size() && !pnt_in_quadtree; k++)
119 {
120 const double v0((*(_pnts[k]))[0] - (*pnt)[0]);
121 const double v1((*(_pnts[k]))[1] - (*pnt)[1]);
122 const double sqr_dist(v0 * v0 + v1 * v1);
124 {
125 pnt_in_quadtree = true;
126 }
127 }
128 if (!pnt_in_quadtree)
129 {
130 _pnts.push_back(pnt);
131 }
132 else
133 {
134 return false;
135 }
136
137 if (_pnts.size() > _max_points_per_leaf)
138 {
139 splitNode();
140 }
141 return true;
142 }
std::vector< POINT const * > _pnts
Definition QuadTree.h:638
bool addPoint(POINT const *pnt)
Definition QuadTree.h:90

References _children, _is_leaf, _ll, _max_points_per_leaf, _pnts, _ur, GeoLib::POINT, and splitNode().

Referenced by splitNode().

◆ balance()

template<typename POINT>
void GeoLib::QuadTree< POINT >::balance ( )
inline

This method balances the quadtree, i.e., it will be inserted nodes such that the depth between neighbored leafs is at most one. If you want to create a mesh (for instance with GMSH) you can use this method to improve the mesh quality. The balance method should be used after inserting all points.

Definition at line 151 of file QuadTree.h.

152 {
155
156 while (!leaf_list.empty())
157 {
159 leaf_list.pop_front();
160
161 if (node->isLeaf())
162 {
163 if (needToRefine(node))
164 {
165 node->splitNode();
166 leaf_list.push_back(node->getChild(Quadrant::NE));
167 leaf_list.push_back(node->getChild(Quadrant::NW));
168 leaf_list.push_back(node->getChild(Quadrant::SW));
169 leaf_list.push_back(node->getChild(Quadrant::SE));
170
171 // check if north neighbor has to be refined
173 if (north_neighbor != nullptr)
174 {
176 {
177 if (north_neighbor->isLeaf())
178 {
179 leaf_list.push_back(north_neighbor);
180 }
181 }
182 }
183
184 // check if west neighbor has to be refined
186 if (west_neighbor != nullptr)
187 {
189 {
190 if (west_neighbor->isLeaf())
191 {
192 leaf_list.push_back(west_neighbor);
193 }
194 }
195 }
196
197 // check if south neighbor has to be refined
199 if (south_neighbor != nullptr)
200 {
202 {
203 if (south_neighbor->isLeaf())
204 {
205 leaf_list.push_back(south_neighbor);
206 }
207 }
208 }
209
210 // check if east neighbor has to be refined
212 if (east_neighbor != nullptr)
213 {
215 {
216 if (east_neighbor->isLeaf())
217 {
218 leaf_list.push_back(east_neighbor);
219 }
220 }
221 }
222 }
223 }
224 }
225 }
QuadTree< POINT > * getNorthNeighbor() const
Definition QuadTree.h:340
static bool needToRefine(QuadTree< POINT > const *const node)
Definition QuadTree.h:539
QuadTree< POINT > const * getChild(Quadrant quadrant) const
Definition QuadTree.h:294
bool isLeaf() const
Definition QuadTree.h:333
std::size_t getDepth() const
Definition QuadTree.h:325
void getLeafs(std::list< QuadTree< POINT > * > &leaf_list)
Definition QuadTree.h:231
QuadTree< POINT > * getWestNeighbor() const
Definition QuadTree.h:442
QuadTree< POINT > * getSouthNeighbor() const
Definition QuadTree.h:374
QuadTree< POINT > * getEastNeighbor() const
Definition QuadTree.h:408
QuadTree(POINT ll, POINT ur, std::size_t max_points_per_leaf)
Definition QuadTree.h:44

References QuadTree(), getChild(), getDepth(), getEastNeighbor(), getLeafs(), getNorthNeighbor(), getSouthNeighbor(), getWestNeighbor(), isLeaf(), NE, needToRefine(), NW, SE, splitNode(), and SW.

◆ getChild() [1/2]

template<typename POINT>
QuadTree< POINT > * GeoLib::QuadTree< POINT >::getChild ( Quadrant quadrant)
inlineprivate

Definition at line 328 of file QuadTree.h.

329 {
330 return _children[static_cast<int>(quadrant)];
331 }

References QuadTree(), and _children.

◆ getChild() [2/2]

template<typename POINT>
QuadTree< POINT > const * GeoLib::QuadTree< POINT >::getChild ( Quadrant quadrant) const
inline

Definition at line 294 of file QuadTree.h.

295 {
296 return _children[quadrant];
297 }

References QuadTree(), and _children.

Referenced by balance(), getEastNeighbor(), getNorthNeighbor(), getSouthNeighbor(), getWestNeighbor(), and needToRefine().

◆ getDepth()

template<typename POINT>
std::size_t GeoLib::QuadTree< POINT >::getDepth ( ) const
inline

Method returns the depth of the current QuadTree node.

Returns
the depth of the current QuadTree node

Definition at line 325 of file QuadTree.h.

325{ return _depth; }

References _depth.

Referenced by balance(), and needToRefine().

◆ getEastNeighbor()

template<typename POINT>
QuadTree< POINT > * GeoLib::QuadTree< POINT >::getEastNeighbor ( ) const
inlineprivate

Definition at line 408 of file QuadTree.h.

409 {
410 if (this->_father == nullptr)
411 { // root of QuadTree
412 return nullptr;
413 }
414
415 if (this->_father->isChild(this, Quadrant::NW))
416 {
417 return this->_father->getChild(Quadrant::NE);
418 }
419 if (this->_father->isChild(this, Quadrant::SW))
420 {
421 return this->_father->getChild(Quadrant::SE);
422 }
423
424 QuadTree<POINT>* east_neighbor(this->_father->getEastNeighbor());
425 if (east_neighbor == nullptr)
426 {
427 return nullptr;
428 }
429 if (east_neighbor->isLeaf())
430 {
431 return east_neighbor;
432 }
433
434 if (this->_father->isChild(this, Quadrant::SE))
435 {
437 }
438
440 }

References QuadTree(), _father, getChild(), isLeaf(), NE, NW, SE, and SW.

Referenced by balance(), and needToRefine().

◆ getFather()

template<typename POINT>
QuadTree< POINT > const * GeoLib::QuadTree< POINT >::getFather ( ) const
inline

Definition at line 292 of file QuadTree.h.

292{ return _father; }

References QuadTree(), and _father.

◆ getLeaf()

template<typename POINT>
void GeoLib::QuadTree< POINT >::getLeaf ( const POINT & pnt,
POINT & ll,
POINT & ur )
inline

Definition at line 254 of file QuadTree.h.

255 {
256 if (this->isLeaf())
257 {
258 ll = _ll;
259 ur = _ur;
260 }
261 else
262 {
263 if (pnt[0] <= 0.5 * (_ur[0] + _ll[0])) // WEST
264 {
265 if (pnt[1] <= 0.5 * (_ur[1] + _ll[1]))
266 { // SOUTH
267 _children[static_cast<int>(Quadrant::SW)]->getLeaf(pnt, ll,
268 ur);
269 }
270 else
271 { // NORTH
272 _children[static_cast<int>(Quadrant::NW)]->getLeaf(pnt, ll,
273 ur);
274 }
275 }
276 else // EAST
277 {
278 if (pnt[1] <= 0.5 * (_ur[1] + _ll[1]))
279 { // SOUTH
280 _children[static_cast<int>(Quadrant::SE)]->getLeaf(pnt, ll,
281 ur);
282 }
283 else
284 { // NORTH
285 _children[static_cast<int>(Quadrant::NE)]->getLeaf(pnt, ll,
286 ur);
287 }
288 }
289 }
290 }
void getLeaf(const POINT &pnt, POINT &ll, POINT &ur)
Definition QuadTree.h:254

References _children, _ll, _ur, getLeaf(), isLeaf(), NE, NW, GeoLib::POINT, SE, and SW.

Referenced by getLeaf().

◆ getLeafs()

template<typename POINT>
void GeoLib::QuadTree< POINT >::getLeafs ( std::list< QuadTree< POINT > * > & leaf_list)
inline

add all leafs of the quadtree to the list

Parameters
leaf_listlist of leafs

Definition at line 231 of file QuadTree.h.

232 {
233 if (_is_leaf)
234 {
235 leaf_list.push_back(this);
236 }
237 else
238 {
239 for (auto& child : _children)
240 {
242 }
243 }
244 }

References QuadTree(), _children, and _is_leaf.

Referenced by balance().

◆ getMaxDepth()

template<typename POINT>
void GeoLib::QuadTree< POINT >::getMaxDepth ( std::size_t & max_depth) const
inline

Method calculates the maximum depth of the QuadTree instance. It is used within the method GMSHAdaptiveMeshDensity::getSteinerPoints().

Parameters
max_depth(input/output) at the entry max_depth contains the maximum depth up to now

Definition at line 305 of file QuadTree.h.

306 {
307 if (max_depth < _depth)
308 {
310 }
311
312 for (auto& child : _children)
313 {
314 if (child)
315 {
317 }
318 }
319 }
void getMaxDepth(std::size_t &max_depth) const
Definition QuadTree.h:305

References _children, and _depth.

◆ getNorthNeighbor()

template<typename POINT>
QuadTree< POINT > * GeoLib::QuadTree< POINT >::getNorthNeighbor ( ) const
inlineprivate

Definition at line 340 of file QuadTree.h.

341 {
342 if (this->_father == nullptr)
343 { // root of QuadTree
344 return nullptr;
345 }
346
347 if (this->_father->isChild(this, Quadrant::SW))
348 {
349 return this->_father->getChild(Quadrant::NW);
350 }
351 if (this->_father->isChild(this, Quadrant::SE))
352 {
353 return this->_father->getChild(Quadrant::NE);
354 }
355
356 QuadTree<POINT>* north_neighbor(this->_father->getNorthNeighbor());
357 if (north_neighbor == nullptr)
358 {
359 return nullptr;
360 }
361 if (north_neighbor->isLeaf())
362 {
363 return north_neighbor;
364 }
365
366 if (this->_father->isChild(this, Quadrant::NW))
367 {
369 }
370
372 }

References QuadTree(), _father, getChild(), isLeaf(), NE, NW, SE, and SW.

Referenced by balance(), and needToRefine().

◆ getPoints()

template<typename POINT>
const std::vector< POINT const * > & GeoLib::QuadTree< POINT >::getPoints ( ) const
inline

Definition at line 246 of file QuadTree.h.

246{ return _pnts; }

References _pnts.

◆ getSouthNeighbor()

template<typename POINT>
QuadTree< POINT > * GeoLib::QuadTree< POINT >::getSouthNeighbor ( ) const
inlineprivate

Definition at line 374 of file QuadTree.h.

375 {
376 if (this->_father == nullptr)
377 { // root of QuadTree
378 return nullptr;
379 }
380
381 if (this->_father->isChild(this, Quadrant::NW))
382 {
383 return this->_father->getChild(Quadrant::SW);
384 }
385 if (this->_father->isChild(this, Quadrant::NE))
386 {
387 return this->_father->getChild(Quadrant::SE);
388 }
389
390 QuadTree<POINT>* south_neighbor(this->_father->getSouthNeighbor());
391 if (south_neighbor == nullptr)
392 {
393 return nullptr;
394 }
395 if (south_neighbor->isLeaf())
396 {
397 return south_neighbor;
398 }
399
400 if (this->_father->isChild(this, Quadrant::SW))
401 {
403 }
404
406 }

References QuadTree(), _father, getChild(), isLeaf(), NE, NW, SE, and SW.

Referenced by balance(), and needToRefine().

◆ getSquarePoints()

template<typename POINT>
void GeoLib::QuadTree< POINT >::getSquarePoints ( POINT & ll,
POINT & ur ) const
inline

Definition at line 248 of file QuadTree.h.

249 {
250 ll = _ll;
251 ur = _ur;
252 }

References _ll, _ur, and GeoLib::POINT.

◆ getWestNeighbor()

template<typename POINT>
QuadTree< POINT > * GeoLib::QuadTree< POINT >::getWestNeighbor ( ) const
inlineprivate

Definition at line 442 of file QuadTree.h.

443 {
444 if (this->_father == nullptr)
445 { // root of QuadTree
446 return nullptr;
447 }
448
449 if (this->_father->isChild(this, Quadrant::NE))
450 {
451 return this->_father->getChild(Quadrant::NW);
452 }
453 if (this->_father->isChild(this, Quadrant::SE))
454 {
455 return this->_father->getChild(Quadrant::SW);
456 }
457
458 QuadTree<POINT>* west_neighbor(this->_father->getWestNeighbor());
459 if (west_neighbor == nullptr)
460 {
461 return nullptr;
462 }
463 if (west_neighbor->isLeaf())
464 {
465 return west_neighbor;
466 }
467
468 if (this->_father->isChild(this, Quadrant::SW))
469 {
471 }
472
474 }

References QuadTree(), _father, getChild(), isLeaf(), NE, NW, SE, and SW.

Referenced by balance(), and needToRefine().

◆ isChild()

template<typename POINT>
bool GeoLib::QuadTree< POINT >::isChild ( QuadTree< POINT > const *const tree,
Quadrant quadrant ) const
inlineprivate

Definition at line 335 of file QuadTree.h.

336 {
337 return _children[static_cast<int>(quadrant)] == tree;
338 }

References QuadTree(), and _children.

◆ isLeaf()

template<typename POINT>
bool GeoLib::QuadTree< POINT >::isLeaf ( ) const
inlineprivate

Definition at line 333 of file QuadTree.h.

333{ return _is_leaf; }

References _is_leaf.

Referenced by balance(), getEastNeighbor(), getLeaf(), getNorthNeighbor(), getSouthNeighbor(), getWestNeighbor(), and needToRefine().

◆ needToRefine()

template<typename POINT>
bool GeoLib::QuadTree< POINT >::needToRefine ( QuadTree< POINT > const *const node)
inlinestaticprivate

Definition at line 539 of file QuadTree.h.

540 {
542 if (north_neighbor != nullptr)
543 {
545 {
546 if (!north_neighbor->isLeaf())
547 {
548 if (!(north_neighbor->getChild(Quadrant::SW))->isLeaf())
549 {
550 return true;
551 }
552 if (!(north_neighbor->getChild(Quadrant::SE))->isLeaf())
553 {
554 return true;
555 }
556 }
557 }
558 }
559
561 if (west_neighbor != nullptr)
562 {
563 if (west_neighbor->getDepth() == node->getDepth())
564 {
565 if (!west_neighbor->isLeaf())
566 {
567 if (!(west_neighbor->getChild(Quadrant::SE))->isLeaf())
568 {
569 return true;
570 }
571 if (!(west_neighbor->getChild(Quadrant::NE))->isLeaf())
572 {
573 return true;
574 }
575 }
576 }
577 }
578
580 if (south_neighbor != nullptr)
581 {
583 {
584 if (!south_neighbor->isLeaf())
585 {
586 if (!(south_neighbor->getChild(Quadrant::NE))->isLeaf())
587 {
588 return true;
589 }
590 if (!(south_neighbor->getChild(Quadrant::NW))->isLeaf())
591 {
592 return true;
593 }
594 }
595 }
596 }
597
599 if (east_neighbor != nullptr)
600 {
601 if (east_neighbor->getDepth() == node->getDepth())
602 {
603 if (!east_neighbor->isLeaf())
604 {
605 if (!(east_neighbor->getChild(Quadrant::NW))->isLeaf())
606 {
607 return true;
608 }
609 if (!(east_neighbor->getChild(Quadrant::SW))->isLeaf())
610 {
611 return true;
612 }
613 }
614 }
615 }
616 return false;
617 }

References QuadTree(), getChild(), getDepth(), getEastNeighbor(), getNorthNeighbor(), getSouthNeighbor(), getWestNeighbor(), isLeaf(), NE, NW, SE, and SW.

Referenced by balance().

◆ splitNode()

template<typename POINT>
void GeoLib::QuadTree< POINT >::splitNode ( )
inlineprivate

Definition at line 497 of file QuadTree.h.

498 {
499 // create children
501 mid_point[0] += (_ur[0] - _ll[0]) / 2.0;
502 mid_point[1] += (_ur[1] - _ll[1]) / 2.0;
503 assert(_children[0] == nullptr);
504 _children[0] = new QuadTree<POINT>(mid_point, _ur, this, _depth + 1,
505 _max_points_per_leaf); // north east
507 h_ll[0] = _ll[0];
508 h_ur[1] = _ur[1];
509 assert(_children[1] == nullptr);
510 _children[1] = new QuadTree<POINT>(h_ll, h_ur, this, _depth + 1,
511 _max_points_per_leaf); // north west
512 assert(_children[2] == nullptr);
513 _children[2] = new QuadTree<POINT>(_ll, mid_point, this, _depth + 1,
514 _max_points_per_leaf); // south west
515 h_ll = _ll;
516 h_ll[0] = mid_point[0];
517 h_ur = _ur;
518 h_ur[1] = mid_point[1];
519 assert(_children[3] == nullptr);
520 _children[3] = new QuadTree<POINT>(h_ll, h_ur, this, _depth + 1,
521 _max_points_per_leaf); // south east
522
523 // distribute points to sub quadtrees
524 for (std::size_t j(0); j < _pnts.size(); j++)
525 {
526 bool nfound(true);
527 for (std::size_t k(0); k < 4 && nfound; k++)
528 {
529 if (_children[k]->addPoint(_pnts[j]))
530 {
531 nfound = false;
532 }
533 }
534 }
535 _pnts.clear();
536 _is_leaf = false;
537 }

References QuadTree(), _children, _depth, _is_leaf, _ll, _max_points_per_leaf, _pnts, _ur, addPoint(), and GeoLib::POINT.

Referenced by addPoint(), and balance().

Member Data Documentation

◆ _children

template<typename POINT>
std::array<QuadTree<POINT>*, 4> GeoLib::QuadTree< POINT >::_children
private
Initial value:
= {nullptr, nullptr, nullptr,
nullptr}

children are sorted: _children[0] is north east child _children[1] is north west child _children[2] is south west child _children[3] is south east child

Definition at line 627 of file QuadTree.h.

627 {nullptr, nullptr, nullptr,
628 nullptr};

Referenced by ~QuadTree(), addPoint(), getChild(), getChild(), getLeaf(), getLeafs(), getMaxDepth(), isChild(), and splitNode().

◆ _depth

template<typename POINT>
std::size_t GeoLib::QuadTree< POINT >::_depth = 0
private

Definition at line 637 of file QuadTree.h.

Referenced by QuadTree(), QuadTree(), getDepth(), getMaxDepth(), and splitNode().

◆ _father

template<typename POINT>
QuadTree<POINT>* GeoLib::QuadTree< POINT >::_father
private

◆ _is_leaf

template<typename POINT>
bool GeoLib::QuadTree< POINT >::_is_leaf = true
private

Definition at line 639 of file QuadTree.h.

Referenced by addPoint(), getLeafs(), isLeaf(), and splitNode().

◆ _ll

template<typename POINT>
POINT GeoLib::QuadTree< POINT >::_ll
private

lower left point of the square

Definition at line 632 of file QuadTree.h.

Referenced by QuadTree(), QuadTree(), addPoint(), getLeaf(), getSquarePoints(), and splitNode().

◆ _max_points_per_leaf

template<typename POINT>
const std::size_t GeoLib::QuadTree< POINT >::_max_points_per_leaf
private

maximum number of points per leaf

Definition at line 643 of file QuadTree.h.

Referenced by QuadTree(), QuadTree(), addPoint(), and splitNode().

◆ _pnts

template<typename POINT>
std::vector<POINT const*> GeoLib::QuadTree< POINT >::_pnts
private

Definition at line 638 of file QuadTree.h.

Referenced by addPoint(), getPoints(), and splitNode().

◆ _ur

template<typename POINT>
POINT GeoLib::QuadTree< POINT >::_ur
private

upper right point of the square

Definition at line 636 of file QuadTree.h.

Referenced by QuadTree(), QuadTree(), addPoint(), getLeaf(), getSquarePoints(), and splitNode().


The documentation for this class was generated from the following files: