Ocean
|
This class defines a node of the k-d tree. More...
Public Member Functions | |
Node ()=default | |
Creates an empty node. More... | |
~Node ()=default | |
Destructs a node. More... | |
Node (const T *value) | |
Creates a new node with given value. More... | |
Node * | left () |
Returns the left child of this node. More... | |
Node * | right () |
Returns the right child of this node. More... | |
const T * | value () |
Returns value of this node. More... | |
void | setLeft (std::unique_ptr< Node > &&left) |
Sets the left child of this node. More... | |
void | setRight (std::unique_ptr< Node > &&right) |
Sets the right child of this node. More... | |
operator bool () const | |
Returns whether this node holds a valid value. More... | |
Protected Attributes | |
const T * | value_ = nullptr |
Node value. More... | |
std::unique_ptr< Node > | left_ = nullptr |
Left node. More... | |
std::unique_ptr< Node > | right_ = nullptr |
Right node. More... | |
This class defines a node of the k-d tree.
|
default |
Creates an empty node.
|
default |
Destructs a node.
|
inlineexplicit |
Creates a new node with given value.
value | Node value |
|
inline |
Returns the left child of this node.
|
inlineexplicit |
Returns whether this node holds a valid value.
|
inline |
Returns the right child of this node.
|
inline |
Sets the left child of this node.
left | The left child |
|
inline |
Sets the right child of this node.
right | The right child |
|
inline |
Returns value of this node.
|
protected |
Left node.
|
protected |
Right node.
|
protected |
Node value.