Rosetta
Public Member Functions | Private Attributes | List of all members
numeric::kdtree::KDNode Class Reference

#include <KDNode.hh>

Inheritance diagram for numeric::kdtree::KDNode:
Inheritance graph
[legend]

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::Reallocation () 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...
 
- Public Member Functions inherited from utility::VirtualBase
 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
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (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_
 

Constructor & Destructor Documentation

◆ KDNode()

numeric::kdtree::KDNode::KDNode ( KDTree const &  tree)

Constructor for a KDNode. Takes a const-refence a KDTree that should contain this KDNode.

◆ ~KDNode()

numeric::kdtree::KDNode::~KDNode ( )
overridedefault

Member Function Documentation

◆ data()

utility::VirtualBaseOP numeric::kdtree::KDNode::data ( ) const

References pt_.

◆ distance() [1/2]

numeric::Real numeric::kdtree::KDNode::distance ( ) const

References pt_.

◆ distance() [2/2]

void numeric::kdtree::KDNode::distance ( numeric::Real  new_dist)

References pt_.

◆ is_leaf()

bool numeric::kdtree::KDNode::is_leaf ( ) const

Returns true if this node has no children, false otherwise.

References left_child(), and right_child().

◆ is_root()

bool numeric::kdtree::KDNode::is_root ( ) const

Returns true if this node has no parent, false otherwise.

References parent().

◆ left_child() [1/2]

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().

◆ left_child() [2/2]

void numeric::kdtree::KDNode::left_child ( KDNodeOP  new_left_child)

Sets the left child for this node.

References left_child_.

◆ location() [1/2]

utility::vector1< numeric::Real > numeric::kdtree::KDNode::location ( ) const

Returns the location of this node in k-space.

References pt_.

◆ location() [2/2]

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_.

◆ parent() [1/2]

KDNodeOP numeric::kdtree::KDNode::parent ( ) const

Returns the parent of this KDNode in the tree, or NULL if there is no parent.

References parent_.

Referenced by is_root().

◆ parent() [2/2]

void numeric::kdtree::KDNode::parent ( KDNodeOP  new_parent)

Sets the parent for this node.

References parent_.

◆ point() [1/2]

KDPointOP numeric::kdtree::KDNode::point ( ) const

References pt_.

◆ point() [2/2]

void numeric::kdtree::KDNode::point ( KDPointOP  new_point)

References pt_.

◆ right_child() [1/2]

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().

◆ right_child() [2/2]

void numeric::kdtree::KDNode::right_child ( KDNodeOP  new_right_child)

Sets the right child for this node.

References right_child_.

◆ split_axis() [1/2]

numeric::Size numeric::kdtree::KDNode::split_axis ( ) const

Returns the dimension along which this node splits points.

References split_axis_.

◆ split_axis() [2/2]

void numeric::kdtree::KDNode::split_axis ( numeric::Size  axis)

Sets the dimension along which this node splits points.

References split_axis_.

◆ tree()

KDTree const & numeric::kdtree::KDNode::tree ( ) const

Returns a const reference to the Tree that contains this KDNode.

References tree_.

Member Data Documentation

◆ left_child_

KDNodeOP numeric::kdtree::KDNode::left_child_
private

Referenced by left_child().

◆ parent_

KDNodeOP numeric::kdtree::KDNode::parent_
private

Referenced by parent().

◆ pt_

KDPointOP numeric::kdtree::KDNode::pt_
private

Referenced by data(), distance(), location(), and point().

◆ right_child_

KDNodeOP numeric::kdtree::KDNode::right_child_
private

Referenced by right_child().

◆ split_axis_

numeric::Size numeric::kdtree::KDNode::split_axis_
private

output operator for KDNode

Referenced by split_axis().

◆ tree_

KDTree const& numeric::kdtree::KDNode::tree_
private

Referenced by tree().


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