|
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 (Point p) 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 138 of file tpl_2dtree.H.
Construct a node with a given point.
Definition at line 146 of file tpl_2dtree.H.
|
inlinenoexcept |
Set the rectangular region for this node.
Definition at line 153 of file tpl_2dtree.H.
References K2Tree< T >::Node::rect_, Aleph::Rectangle::set_rect(), K2Tree< T >::Node::xmax(), K2Tree< T >::Node::xmin(), K2Tree< T >::Node::ymax(), and K2Tree< T >::Node::ymin().
Referenced by K2Tree< T >::build_balanced(), and K2Tree< T >::insert().
Set the rectangular region using corner points.
Definition at line 160 of file tpl_2dtree.H.
References Aleph::pmax(), Aleph::pmin(), K2Tree< T >::Node::rect_, and Aleph::Rectangle::set_rect().
|
inlinenoexcept |
Definition at line 169 of file tpl_2dtree.H.
References Aleph::Point::get_x(), and K2Tree< T >::Node::point_.
Referenced by K2Tree< T >::build_balanced().
|
inlinenoexcept |
Definition at line 167 of file tpl_2dtree.H.
References Aleph::Rectangle::get_xmax(), and K2Tree< T >::Node::rect_.
Referenced by K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 165 of file tpl_2dtree.H.
References Aleph::Rectangle::get_xmin(), and K2Tree< T >::Node::rect_.
Referenced by K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 170 of file tpl_2dtree.H.
References Aleph::Point::get_y(), and K2Tree< T >::Node::point_.
Referenced by K2Tree< T >::build_balanced().
|
inlinenoexcept |
Definition at line 168 of file tpl_2dtree.H.
References Aleph::Rectangle::get_ymax(), and K2Tree< T >::Node::rect_.
Referenced by K2Tree< T >::Node::set_rect().
|
inlinenoexcept |
Definition at line 166 of file tpl_2dtree.H.
References Aleph::Rectangle::get_ymin(), and K2Tree< T >::Node::rect_.
Referenced by K2Tree< T >::Node::set_rect().
Left/bottom subtree.
Definition at line 142 of file tpl_2dtree.H.
Referenced by K2Tree< T >::build_balanced(), and K2Tree< T >::for_each_node().
The point stored at this node.
Definition at line 140 of file tpl_2dtree.H.
Referenced by K2Tree< T >::for_each_node(), K2Tree< T >::nearest(), K2Tree< T >::Node::x(), and K2Tree< T >::Node::y().
The axis-aligned rectangle for this node's region.
Definition at line 141 of file tpl_2dtree.H.
Referenced by 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 143 of file tpl_2dtree.H.
Referenced by K2Tree< T >::build_balanced(), and K2Tree< T >::for_each_node().