IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
IMP::algebra::NearestNeighborD< D > Class Template Reference

Build a structure for finding nearest neighbors. More...

#include <IMP/algebra/vector_search.h>

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

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.

Public Member Functions

template<class It >
 NearestNeighborD (It b, It e, double epsilon=0)
 
 NearestNeighborD (const Vector< VectorD< D > > &vs, double epsilon=0)
 
Ints get_in_ball (unsigned int i, double distance) const
 Find all points within the provided distance. More...
 
Ints get_in_ball (const VectorD< D > &pt, double distance) const
 Find all points within the provided distance. More...
 
unsigned int get_nearest_neighbor (const VectorD< D > &q) const
 
unsigned int get_nearest_neighbor (unsigned int i) const
 Search using the ith point in the input set. More...
 
Ints get_nearest_neighbors (unsigned int i, unsigned int k) const
 Search using the ith point in the input set. More...
 
Ints get_nearest_neighbors (const algebra::VectorD< D > &v, unsigned int k) const
 
virtual std::string get_type_name () const
 
virtual ::IMP::VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
void set_query_log (std::string fname)
 Log the points and queries to a file for performance studies. More...
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
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::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

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 149 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 157 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 109 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.

Returns
the k nearest neighbors.

Definition at line 123 of file vector_search.h.

template<int D>
virtual ::IMP::VersionInfo IMP::algebra::NearestNeighborD< D >::get_version_info ( ) const
virtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 164 of file vector_search.h.

template<int D>
void IMP::algebra::NearestNeighborD< D >::set_query_log ( std::string  fname)

Log the points and queries to a file for performance studies.

Definition at line 83 of file vector_search.h.


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