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 28 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 31 of file QuadTree.h.

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

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 45 of file QuadTree.h.

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

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 77 of file QuadTree.h.

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

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 485 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 91 of file QuadTree.h.

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

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 152 of file QuadTree.h.

153 {
156
157 while (!leaf_list.empty())
158 {
160 leaf_list.pop_front();
161
162 if (node->isLeaf())
163 {
164 if (needToRefine(node))
165 {
166 node->splitNode();
167 leaf_list.push_back(node->getChild(Quadrant::NE));
168 leaf_list.push_back(node->getChild(Quadrant::NW));
169 leaf_list.push_back(node->getChild(Quadrant::SW));
170 leaf_list.push_back(node->getChild(Quadrant::SE));
171
172 // check if north neighbor has to be refined
174 if (north_neighbor != nullptr)
175 {
177 {
178 if (north_neighbor->isLeaf())
179 {
180 leaf_list.push_back(north_neighbor);
181 }
182 }
183 }
184
185 // check if west neighbor has to be refined
187 if (west_neighbor != nullptr)
188 {
190 {
191 if (west_neighbor->isLeaf())
192 {
193 leaf_list.push_back(west_neighbor);
194 }
195 }
196 }
197
198 // check if south neighbor has to be refined
200 if (south_neighbor != nullptr)
201 {
203 {
204 if (south_neighbor->isLeaf())
205 {
206 leaf_list.push_back(south_neighbor);
207 }
208 }
209 }
210
211 // check if east neighbor has to be refined
213 if (east_neighbor != nullptr)
214 {
216 {
217 if (east_neighbor->isLeaf())
218 {
219 leaf_list.push_back(east_neighbor);
220 }
221 }
222 }
223 }
224 }
225 }
226 }
QuadTree< POINT > * getNorthNeighbor() const
Definition QuadTree.h:341
static bool needToRefine(QuadTree< POINT > const *const node)
Definition QuadTree.h:540
QuadTree< POINT > const * getChild(Quadrant quadrant) const
Definition QuadTree.h:295
bool isLeaf() const
Definition QuadTree.h:334
std::size_t getDepth() const
Definition QuadTree.h:326
void getLeafs(std::list< QuadTree< POINT > * > &leaf_list)
Definition QuadTree.h:232
QuadTree< POINT > * getWestNeighbor() const
Definition QuadTree.h:443
QuadTree< POINT > * getSouthNeighbor() const
Definition QuadTree.h:375
QuadTree< POINT > * getEastNeighbor() const
Definition QuadTree.h:409
QuadTree(POINT ll, POINT ur, std::size_t max_points_per_leaf)
Definition QuadTree.h:45

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 329 of file QuadTree.h.

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

References QuadTree(), and _children.

◆ getChild() [2/2]

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

Definition at line 295 of file QuadTree.h.

296 {
297 return _children[quadrant];
298 }

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 326 of file QuadTree.h.

326{ return _depth; }

References _depth.

Referenced by balance(), and needToRefine().

◆ getEastNeighbor()

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

Definition at line 409 of file QuadTree.h.

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

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 293 of file QuadTree.h.

293{ 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 255 of file QuadTree.h.

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

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 232 of file QuadTree.h.

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

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 306 of file QuadTree.h.

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

References _children, and _depth.

◆ getNorthNeighbor()

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

Definition at line 341 of file QuadTree.h.

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

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 247 of file QuadTree.h.

247{ return _pnts; }

References _pnts.

◆ getSouthNeighbor()

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

Definition at line 375 of file QuadTree.h.

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

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 249 of file QuadTree.h.

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

References _ll, _ur, and GeoLib::POINT.

◆ getWestNeighbor()

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

Definition at line 443 of file QuadTree.h.

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

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 336 of file QuadTree.h.

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

References QuadTree(), and _children.

◆ isLeaf()

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

Definition at line 334 of file QuadTree.h.

334{ 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 540 of file QuadTree.h.

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

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 498 of file QuadTree.h.

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

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 628 of file QuadTree.h.

628 {nullptr, nullptr, nullptr,
629 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 638 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 640 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 633 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 644 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 639 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 637 of file QuadTree.h.

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


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