IMP logo
Public Member Functions | Static Public Member Functions
IMP::algebra::NearestNeighborD< D > Class Template Reference

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.

Examples: multiscale

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

List of all members.

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
std::size_t __hash__ () const
virtual std::string get_type_name () const =0
 Return a string identifying the type of the object.
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.
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)

Static Public Member Functions

static NearestNeighborDget_from (IMP::base::Object *o)

Additional Inherited Members

- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)

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.

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.

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.

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.

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.


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

Generated on Tue May 22 2012 23:33:25 for IMP by doxygen 1.8.1