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