maliput
Node< Coordinate, Region > Class Template Reference

Detailed Description

template<typename Coordinate, typename Region>
class maliput::math::details::Node< Coordinate, Region >

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.

Template Parameters
CoordinateThe type of the coordinate.
RegionThe 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...
 
Nodeget_left ()
 
Nodeget_right ()
 
Node const * get_left () const
 
Node const * get_right () const
 
const Nodeget_parent () const
 
const Region & get_region () const
 
std::size_t get_index () const
 

Constructor & Destructor Documentation

◆ Node()

Node ( const Coordinate &  point)

Constructs a Node.

Parameters
pointThe point that the node represents.

Member Function Documentation

◆ get_coordinate()

const Coordinate& get_coordinate ( ) const

Returns the point that the node represents.

◆ get_index()

std::size_t get_index ( ) const
Returns
The dimension being evaluated for the kd-tree algorithm.

◆ get_left() [1/2]

Node* get_left ( )
Returns
The left sub-node.

◆ get_left() [2/2]

Node const* get_left ( ) const
Returns
The left sub-node.

◆ get_parent()

const Node* get_parent ( ) const
Returns
The parent of the node.

◆ get_region()

const Region& get_region ( ) const
Returns
The region of the node.

◆ get_right() [1/2]

Node* get_right ( )
Returns
The right sub-node.

◆ get_right() [2/2]

Node const* get_right ( ) const
Returns
The right sub-node.

◆ set_index()

void set_index ( std::size_t  index)

Stores the dimension being evaluated for the kd-tree algorithm.

◆ set_left()

void set_left ( Node< Coordinate, Region > *  left)

Sets left as the left sub-node.

◆ set_parent()

void set_parent ( Node< Coordinate, Region > *  parent)

Sets parent as the parent of the node.

◆ set_region()

void set_region ( std::unique_ptr< Region >  region)

Sets region as the region of the node.

◆ set_right()

void set_right ( Node< Coordinate, Region > *  right)

Sets right as the right sub-node.


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