Rosetta
|
#include <KDNode.hh>
Public Member Functions | |
KDNode (KDTree const &tree) | |
Constructor for a KDNode. Takes a const-refence a KDTree that should contain this KDNode. More... | |
~KDNode () override | |
KDNodeOP | parent () const |
Returns the parent of this KDNode in the tree, or NULL if there is no parent. More... | |
KDNodeOP | left_child () const |
Returns the left child of this KDNode in the tree, or NULL if there is no left child. More... | |
KDNodeOP | right_child () const |
Returns the right child of this KDNode in the tree, or NULL if there is no right child. More... | |
KDTree const & | tree () const |
Returns a const reference to the Tree that contains this KDNode. More... | |
utility::vector1< numeric::Real > | location () const |
Returns the location of this node in k-space. More... | |
utility::VirtualBaseOP | data () const |
numeric::Size | split_axis () const |
Returns the dimension along which this node splits points. More... | |
bool | is_leaf () const |
Returns true if this node has no children, false otherwise. More... | |
bool | is_root () const |
Returns true if this node has no parent, false otherwise. More... | |
KDPointOP | point () const |
numeric::Real | distance () const |
void | parent (KDNodeOP new_parent) |
Sets the parent for this node. More... | |
void | left_child (KDNodeOP new_left_child) |
Sets the left child for this node. More... | |
void | right_child (KDNodeOP new_right_child) |
Sets the right child for this node. More... | |
void | location (utility::vector1< numeric::Real > new_location) |
Sets the location of this node in k-space. More... | |
void | point (KDPointOP new_point) |
void | distance (numeric::Real new_dist) |
void | split_axis (numeric::Size axis) |
Sets the dimension along which this node splits points. More... | |
![]() | |
VirtualBase ()=default | |
Default constructor. More... | |
virtual | ~VirtualBase ()=default |
The virtual destructor is one of the main reasons for the VirtualBase class. More... | |
VirtualBase (VirtualBase const &)=default | |
VirtualBase (VirtualBase &&)=default | |
VirtualBase & | operator= (VirtualBase const &)=default |
VirtualBase & | operator= (VirtualBase &&)=default |
Private Attributes | |
numeric::Size | split_axis_ |
output operator for KDNode More... | |
KDNodeOP | parent_ |
KDNodeOP | left_child_ |
KDNodeOP | right_child_ |
KDPointOP | pt_ |
KDTree const & | tree_ |
numeric::kdtree::KDNode::KDNode | ( | KDTree const & | tree | ) |
|
overridedefault |
utility::VirtualBaseOP numeric::kdtree::KDNode::data | ( | ) | const |
References pt_.
numeric::Real numeric::kdtree::KDNode::distance | ( | ) | const |
References pt_.
void numeric::kdtree::KDNode::distance | ( | numeric::Real | new_dist | ) |
References pt_.
bool numeric::kdtree::KDNode::is_leaf | ( | ) | const |
Returns true if this node has no children, false otherwise.
References left_child(), and right_child().
bool numeric::kdtree::KDNode::is_root | ( | ) | const |
Returns true if this node has no parent, false otherwise.
References parent().
KDNodeOP numeric::kdtree::KDNode::left_child | ( | ) | const |
Returns the left child of this KDNode in the tree, or NULL if there is no left child.
References left_child_.
Referenced by is_leaf().
void numeric::kdtree::KDNode::left_child | ( | KDNodeOP | new_left_child | ) |
Sets the left child for this node.
References left_child_.
utility::vector1< numeric::Real > numeric::kdtree::KDNode::location | ( | ) | const |
Returns the location of this node in k-space.
References pt_.
void numeric::kdtree::KDNode::location | ( | utility::vector1< numeric::Real > | new_location | ) |
Sets the location of this node in k-space.
References correlation_time::loc, and pt_.
KDNodeOP numeric::kdtree::KDNode::parent | ( | ) | const |
void numeric::kdtree::KDNode::parent | ( | KDNodeOP | new_parent | ) |
Sets the parent for this node.
References parent_.
KDNodeOP numeric::kdtree::KDNode::right_child | ( | ) | const |
Returns the right child of this KDNode in the tree, or NULL if there is no right child.
References right_child_.
Referenced by is_leaf().
void numeric::kdtree::KDNode::right_child | ( | KDNodeOP | new_right_child | ) |
Sets the right child for this node.
References right_child_.
numeric::Size numeric::kdtree::KDNode::split_axis | ( | ) | const |
Returns the dimension along which this node splits points.
References split_axis_.
void numeric::kdtree::KDNode::split_axis | ( | numeric::Size | axis | ) |
Sets the dimension along which this node splits points.
References split_axis_.
KDTree const & numeric::kdtree::KDNode::tree | ( | ) | const |
|
private |
Referenced by left_child().
|
private |
Referenced by data(), distance(), location(), and point().
|
private |
Referenced by right_child().
|
private |
output operator for KDNode
Referenced by split_axis().