IMP  2.0.1
The Integrative Modeling Platform
IMP::algebra::NearestNeighborD< D > Class Template Reference

#include <IMP/algebra/vector_search.h>

+ Inheritance diagram for IMP::algebra::NearestNeighborD< D >:

Public Member Functions

template<class It >
 NearestNeighborD (It b, It e, double epsilon=0)
 
 NearestNeighborD (const base::Vector< VectorD< D > > &vs, double epsilon=0)
 
Ints get_in_ball (unsigned int i, double distance) const
 
Ints get_in_ball (const VectorD< D > &pt, double distance) const
 
unsigned int get_nearest_neighbor (const VectorD< D > &q) const
 
unsigned int get_nearest_neighbor (unsigned int i) const
 
Ints get_nearest_neighbors (unsigned int i, unsigned int k) const
 
Ints get_nearest_neighbors (const algebra::VectorD< D > &v, unsigned int k) const
 
void set_query_log (std::string fname)
 Log the points and queries to a file for performance studies.
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual IMP::base::VersionInfo get_version_info () const =0
 Get information about the module and version of the object.
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

Detailed Description

template<int D>
class IMP::algebra::NearestNeighborD< D >

Build a structure for finding nearest neighbors. Different implementations are used depending on what optional dependencies are available. The class NearestNeighborD uses CGAL in order to improve its functionality. It will fall back on less good code without it. The class NearestNeighborD uses ANN in order to improve its functionality. It will fall back on less good code without it.

Definition at line 54 of file vector_search.h.

Member Function Documentation

template<int D>
Ints IMP::algebra::NearestNeighborD< D >::get_in_ball ( unsigned int  i,
double  distance 
) const

Find all points within the provided distance.

Definition at line 150 of file vector_search.h.

template<int D>
Ints IMP::algebra::NearestNeighborD< D >::get_in_ball ( const VectorD< D > &  pt,
double  distance 
) const

Find all points within the provided distance.

Definition at line 158 of file vector_search.h.

template<int D>
unsigned int IMP::algebra::NearestNeighborD< D >::get_nearest_neighbor ( unsigned int  i) const

Search using the ith point in the input set.

Definition at line 110 of file vector_search.h.

template<int D>
Ints IMP::algebra::NearestNeighborD< D >::get_nearest_neighbors ( unsigned int  i,
unsigned int  k 
) const

Search using the ith point in the input set. Return the k nearest neighbors.

Definition at line 124 of file vector_search.h.


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