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

#include <KDTree.hh>

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

Public Member Functions

 ~KDTree () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. More...
 
 KDTree ()
 Empty constructor. More...
 
 KDTree (utility::vector1< utility::vector1< numeric::Real > > &pts)
 Constructs a balanced kd-tree from the set of k-dimensional input points. More...
 
 KDTree (utility::vector1< utility::vector1< numeric::Real > > &pts, utility::vector1< utility::VirtualBaseOP > &data)
 
numeric::Size size () const
 Number of points in the kd-tree. More...
 
numeric::Size ndim () const
 Number of dimensions in the kd-tree. This is the "k" in kd. More...
 
KDNodeOP root () const
 Returns the KDNodeOP that is the root of the balanced kd-tree. More...
 
HyperRectangleOP bounds () const
 Returns the HyperRectangle that bounds all of the points in the kd-tree. More...
 
void size (numeric::Size new_size)
 Sets the number of points in this kd-tree. More...
 
void root (KDNodeOP new_root)
 Sets the root of the kd-tree. More...
 
void extend_bounds (utility::vector1< numeric::Real > const &pt)
 Pushes out the bounds of the HyperRectangle bounding this kd-tree if necessary. 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 size_
 
KDNodeOP root_
 
HyperRectangleOP bounds_
 

Constructor & Destructor Documentation

◆ ~KDTree()

numeric::kdtree::KDTree::~KDTree ( )
overridedefault

Automatically generated virtual destructor for class deriving directly from VirtualBase.

Auto-generated virtual destructor

◆ KDTree() [1/3]

numeric::kdtree::KDTree::KDTree ( )

Empty constructor.

◆ KDTree() [2/3]

numeric::kdtree::KDTree::KDTree ( utility::vector1< utility::vector1< numeric::Real > > &  pts)

Constructs a balanced kd-tree from the set of k-dimensional input points.

References bounds_, numeric::kdtree::construct_kd_tree(), numeric::kdtree::make_points(), add_xyz_to_pose::pts, root_, and size().

◆ KDTree() [3/3]

numeric::kdtree::KDTree::KDTree ( utility::vector1< utility::vector1< numeric::Real > > &  pts,
utility::vector1< utility::VirtualBaseOP > &  data 
)

Member Function Documentation

◆ bounds()

HyperRectangleOP numeric::kdtree::KDTree::bounds ( ) const

Returns the HyperRectangle that bounds all of the points in the kd-tree.

A HyperRectangle is defined as two vectors upper and lower, with each dimension of lower having the minimum value seen in each dimension, and each dimension of higher having the maximum value seen in each dimension.

References bounds_.

Referenced by numeric::kdtree::nearest_neighbor(), and numeric::kdtree::nearest_neighbors().

◆ extend_bounds()

void numeric::kdtree::KDTree::extend_bounds ( utility::vector1< numeric::Real > const &  pt)

Pushes out the bounds of the HyperRectangle bounding this kd-tree if necessary.

References bounds_.

◆ ndim()

numeric::Size numeric::kdtree::KDTree::ndim ( ) const

Number of dimensions in the kd-tree. This is the "k" in kd.

References bounds_.

◆ root() [1/2]

KDNodeOP numeric::kdtree::KDTree::root ( ) const

Returns the KDNodeOP that is the root of the balanced kd-tree.

References root_.

Referenced by numeric::kdtree::nearest_neighbor(), and numeric::kdtree::nearest_neighbors().

◆ root() [2/2]

void numeric::kdtree::KDTree::root ( KDNodeOP  new_root)

Sets the root of the kd-tree.

References root_.

◆ size() [1/2]

numeric::Size numeric::kdtree::KDTree::size ( ) const

Number of points in the kd-tree.

References size_.

Referenced by KDTree().

◆ size() [2/2]

void numeric::kdtree::KDTree::size ( numeric::Size  new_size)

Sets the number of points in this kd-tree.

References size_.

Member Data Documentation

◆ bounds_

HyperRectangleOP numeric::kdtree::KDTree::bounds_
private

Referenced by bounds(), extend_bounds(), KDTree(), and ndim().

◆ root_

KDNodeOP numeric::kdtree::KDTree::root_
private

Referenced by KDTree(), and root().

◆ size_

numeric::Size numeric::kdtree::KDTree::size_
private

Referenced by size().


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