IMP  2.1.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
 
virtual std::string get_type_name () const
 
virtual ::IMP::base::VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
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 void do_destroy ()
 
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::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
 Object ()
 

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 53 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 148 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 156 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 108 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 122 of file vector_search.h.


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