|
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
|
Build a structure for finding nearest neighbors. More...
#include <IMP/algebra/vector_search.h>
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 55 of file vector_search.h.
Public Member Functions | |
| NearestNeighborD (const Vector< VectorD< D > > &vs, double epsilon=0) | |
| template<class It> | |
| NearestNeighborD (It b, It e, double epsilon=0) | |
| Ints | get_in_ball (const VectorD< D > &pt, double distance) const |
| Find all points within the provided distance. | |
| Ints | get_in_ball (unsigned int i, double distance) const |
| Find all points within the provided distance. | |
| 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. | |
| Ints | get_nearest_neighbors (const algebra::VectorD< D > &v, unsigned int k) const |
| Ints | get_nearest_neighbors (unsigned int i, unsigned int k) const |
| Search using the ith point in the input set. | |
| virtual std::string | get_type_name () const override |
| virtual ::IMP::VersionInfo | get_version_info () const override |
| 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::Object | |
| CheckLevel | get_check_level () const |
| get_derived_object (self) | |
| Return this object cast to the most derived subclass. | |
| 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. | |
| const std::string & | get_name () const |
| Get the (not necessarily unique) name of this object. | |
| void | set_name (std::string name) |
| void | set_was_used (bool tf) const |
| void | show (std::ostream &out=std::cout) const |
| virtual void | clear_caches () |
Additional Inherited Members | |
| Protected Member Functions inherited from IMP::Object | |
| Object (std::string name) | |
| Construct an object with the given name. | |
| virtual void | do_destroy () |
| IMP::algebra::NearestNeighborD< D >::NearestNeighborD | ( | It | b, |
| It | e, | ||
| double | epsilon = 0 ) |
Definition at line 73 of file vector_search.h.
| IMP::algebra::NearestNeighborD< D >::NearestNeighborD | ( | const Vector< VectorD< D > > & | vs, |
| double | epsilon = 0 ) |
Definition at line 77 of file vector_search.h.
|
virtual |
Definition at line 180 of file vector_search.h.
| 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 173 of file vector_search.h.
| Ints IMP::algebra::NearestNeighborD< D >::get_in_ball | ( | unsigned int | i, |
| double | distance ) const |
Find all points within the provided distance.
Definition at line 162 of file vector_search.h.
| unsigned int IMP::algebra::NearestNeighborD< D >::get_nearest_neighbor | ( | const VectorD< D > & | q | ) | const |
Definition at line 97 of file vector_search.h.
| 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.
| Ints IMP::algebra::NearestNeighborD< D >::get_nearest_neighbors | ( | const algebra::VectorD< D > & | v, |
| unsigned int | k ) const |
Definition at line 146 of file vector_search.h.
| Ints IMP::algebra::NearestNeighborD< D >::get_nearest_neighbors | ( | unsigned int | i, |
| unsigned int | k ) const |
Search using the ith point in the input set.
Definition at line 124 of file vector_search.h.
|
overridevirtual |
Reimplemented from IMP::Object.
Definition at line 180 of file vector_search.h.
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 180 of file vector_search.h.
| 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 84 of file vector_search.h.