|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Internal node structure for the k-d tree. More...
Public Member Functions | |
| Node (const Point &__point) noexcept | |
| Construct a node with a given point. | |
| void | set_rect (const Geom_Number &xmin, const Geom_Number &ymin, const Geom_Number &xmax, const Geom_Number &ymax) noexcept |
| Set the rectangular region for this node. | |
| void | set_rect (const Point &pmin, const Point &pmax) noexcept |
| Set the rectangular region using corner points. | |
| const Geom_Number & | xmin () const noexcept |
| const Geom_Number & | ymin () const noexcept |
| const Geom_Number & | xmax () const noexcept |
| const Geom_Number & | ymax () const noexcept |
| const Geom_Number & | x () const noexcept |
| const Geom_Number & | y () const noexcept |
Public Attributes | |
| Point | point |
| The point stored at this node. | |
| Rectangle | rect |
| The axis-aligned rectangle for this node's region. | |
| Node * | lb |
| Left/bottom subtree. | |
| Node * | rt |
| Right/top subtree. | |
Internal node structure for the k-d tree.
Definition at line 134 of file tpl_2dtree.H.
Construct a node with a given point.
Definition at line 142 of file tpl_2dtree.H.
|
inlinenoexcept |
Set the rectangular region for this node.
Definition at line 149 of file tpl_2dtree.H.
References K2Tree< T >::Node::rect, Rectangle::set_rect(), K2Tree< T >::Node::xmax(), K2Tree< T >::Node::xmin(), K2Tree< T >::Node::ymax(), and K2Tree< T >::Node::ymin().
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::insert(), and K2Tree< T >::lr_insert().
Set the rectangular region using corner points.
Definition at line 156 of file tpl_2dtree.H.
References K2Tree< T >::pmax, K2Tree< T >::pmin, K2Tree< T >::Node::rect, and Rectangle::set_rect().
|
inlinenoexcept |
Definition at line 165 of file tpl_2dtree.H.
References K2Tree< T >::Node::point.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::bu_search(), K2Tree< T >::lr_insert(), K2Tree< T >::lr_nearest(), and K2Tree< T >::lr_search().
|
inlinenoexcept |
Definition at line 163 of file tpl_2dtree.H.
References Rectangle::get_xmax(), and K2Tree< T >::Node::rect.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::lr_insert(), and K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 161 of file tpl_2dtree.H.
References Rectangle::get_xmin(), and K2Tree< T >::Node::rect.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::lr_insert(), and K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 166 of file tpl_2dtree.H.
References K2Tree< T >::Node::point.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::bu_nearest(), K2Tree< T >::bu_search(), K2Tree< T >::lr_insert(), and K2Tree< T >::lr_search().
|
inlinenoexcept |
Definition at line 164 of file tpl_2dtree.H.
References Rectangle::get_ymax(), and K2Tree< T >::Node::rect.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::lr_insert(), and K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 162 of file tpl_2dtree.H.
References Rectangle::get_ymin(), and K2Tree< T >::Node::rect.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::lr_insert(), and K2Tree< T >::Node::set_rect().
Left/bottom subtree.
Definition at line 138 of file tpl_2dtree.H.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::bu_nearest(), K2Tree< T >::bu_search(), K2Tree< T >::lr_insert(), K2Tree< T >::lr_nearest(), K2Tree< T >::lr_search(), and K2Tree< T >::range().
The point stored at this node.
Definition at line 136 of file tpl_2dtree.H.
Referenced by K2Tree< T >::bu_nearest(), K2Tree< T >::insert(), K2Tree< T >::lr_nearest(), K2Tree< T >::nearest(), K2Tree< T >::range(), K2Tree< T >::Node::x(), and K2Tree< T >::Node::y().
The axis-aligned rectangle for this node's region.
Definition at line 137 of file tpl_2dtree.H.
Referenced by K2Tree< T >::bu_nearest(), K2Tree< T >::lr_nearest(), K2Tree< T >::range(), K2Tree< T >::Node::set_rect(), K2Tree< T >::Node::set_rect(), K2Tree< T >::Node::xmax(), K2Tree< T >::Node::xmin(), K2Tree< T >::Node::ymax(), and K2Tree< T >::Node::ymin().
Right/top subtree.
Definition at line 139 of file tpl_2dtree.H.
Referenced by K2Tree< T >::bu_insert(), K2Tree< T >::bu_nearest(), K2Tree< T >::bu_search(), K2Tree< T >::lr_insert(), K2Tree< T >::lr_nearest(), K2Tree< T >::lr_search(), and K2Tree< T >::range().