maliput
|
Represents a node in a kd-tree data structure.
The node is in essence a point of the data structure that divides the upper parent node into two sub-trees, left and right.
Coordinate | The type of the coordinate. |
Region | The type of the region. For example for 3D space, the region could be maliput::math::AxisAlignedBox. |
#include <include/maliput/math/kd_tree.h>
Public Member Functions | |
Node (const Coordinate &point) | |
Constructs a Node. More... | |
const Coordinate & | get_coordinate () const |
Returns the point that the node represents. More... | |
void | set_left (Node *left) |
Sets left as the left sub-node. More... | |
void | set_right (Node *right) |
Sets right as the right sub-node. More... | |
void | set_parent (Node *parent) |
Sets parent as the parent of the node. More... | |
void | set_region (std::unique_ptr< Region > region) |
Sets region as the region of the node. More... | |
void | set_index (std::size_t index) |
Stores the dimension being evaluated for the kd-tree algorithm. More... | |
Node * | get_left () |
Node * | get_right () |
Node const * | get_left () const |
Node const * | get_right () const |
const Node * | get_parent () const |
const Region & | get_region () const |
std::size_t | get_index () const |
Node | ( | const Coordinate & | point | ) |
Constructs a Node.
point | The point that the node represents. |
const Coordinate& get_coordinate | ( | ) | const |
Returns the point that the node represents.
std::size_t get_index | ( | ) | const |
Node* get_left | ( | ) |
Node const* get_left | ( | ) | const |
const Node* get_parent | ( | ) | const |
const Region& get_region | ( | ) | const |
Node* get_right | ( | ) |
Node const* get_right | ( | ) | const |
void set_index | ( | std::size_t | index | ) |
Stores the dimension being evaluated for the kd-tree algorithm.
void set_left | ( | Node< Coordinate, Region > * | left | ) |
Sets left
as the left sub-node.
void set_parent | ( | Node< Coordinate, Region > * | parent | ) |
Sets parent
as the parent of the node.
void set_region | ( | std::unique_ptr< Region > | region | ) |
Sets region
as the region of the node.
void set_right | ( | Node< Coordinate, Region > * | right | ) |
Sets right
as the right sub-node.