Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_ANN_FLANN_wrapper< GetDistance, GetPoint, IndexParams, SearchParams > Class Template Reference

Nearest neighbor engine from FLANN library. More...

#include <ANN_FLANN_wrapper.hpp>

Public Types

enum  ANN_query_type { ANN_BY_K, ANN_BY_RANGE }
 
typedef T_ANN_FLANN_wrapper< GetDistance, GetPoint, IndexParams, SearchParams > Self
 
typedef GetDistance Get_distance
 
typedef GetDistance Distance
 
typedef GetPoint Get_point
 
typedef GetDistance::FT FT
 
typedef GetDistance::Point Point
 
typedef flann::Index< GetDistance > flann_index_type
 

Public Member Functions

 T_ANN_FLANN_wrapper (unsigned k=1, const IndexParams &index_params=IndexParams(), const SearchParams &search_params=SearchParams())
 
 T_ANN_FLANN_wrapper (Get_distance &distance, Get_point &get_point, unsigned k=1, const IndexParams &index_params=IndexParams(), const SearchParams &search_params=SearchParams())
 
 T_ANN_FLANN_wrapper (const Self &other)
 
 ~T_ANN_FLANN_wrapper (void)
 
const Pointget_point (unsigned i) const
 
FT get_distance (const Point &p, const Point &q) const
 
void set_query_type (ANN_query_type query_type)
 
void set_number_of_neighbors (unsigned k)
 
void set_range (const FT &range)
 
void reset (void)
 
void clear (void)
 
void insert (const Point &p)
 
template<class InputIterator >
void insert (InputIterator begin, InputIterator end)
 
int get_nearest_neighbor (const Point &p, bool self_allowed) const
 
const Pointoperator() (const Point &p, bool self_allowed) const
 
template<class OutputIterator >
OutputIterator operator() (const Point &p, bool self_allowed, OutputIterator out) const
 

Detailed Description

template<class GetDistance, class GetPoint, class IndexParams = flann::LinearIndexParams, class SearchParams = flann::SearchParams>
class SBL::GT::T_ANN_FLANN_wrapper< GetDistance, GetPoint, IndexParams, SearchParams >

Nearest neighbor engine from FLANN library.

...

Member Typedef Documentation

◆ Distance

typedef GetDistance Distance

◆ flann_index_type

typedef flann::Index<GetDistance> flann_index_type

◆ FT

typedef GetDistance::FT FT

◆ Get_distance

typedef GetDistance Get_distance

◆ Get_point

typedef GetPoint Get_point

◆ Point

typedef GetDistance::Point Point

◆ Self

typedef T_ANN_FLANN_wrapper<GetDistance, GetPoint, IndexParams, SearchParams> Self

Member Enumeration Documentation

◆ ANN_query_type

Enumerator
ANN_BY_K 
ANN_BY_RANGE 

Constructor & Destructor Documentation

◆ T_ANN_FLANN_wrapper() [1/3]

T_ANN_FLANN_wrapper ( unsigned  k = 1,
const IndexParams &  index_params = IndexParams(),
const SearchParams &  search_params = SearchParams() 
)
inline

◆ T_ANN_FLANN_wrapper() [2/3]

T_ANN_FLANN_wrapper ( Get_distance distance,
Get_point get_point,
unsigned  k = 1,
const IndexParams &  index_params = IndexParams(),
const SearchParams &  search_params = SearchParams() 
)
inline

◆ T_ANN_FLANN_wrapper() [3/3]

T_ANN_FLANN_wrapper ( const Self other)
inline

◆ ~T_ANN_FLANN_wrapper()

~T_ANN_FLANN_wrapper ( void  )
inline

Member Function Documentation

◆ clear()

void clear ( void  )
inline

◆ get_distance()

GetDistance::FT get_distance ( const Point p,
const Point q 
) const
inline

◆ get_nearest_neighbor()

int get_nearest_neighbor ( const Point p,
bool  self_allowed 
) const
inline

◆ get_point()

const GetDistance::Point & get_point ( unsigned  i) const
inline

◆ insert() [1/2]

void insert ( const Point p)
inline

◆ insert() [2/2]

void insert ( InputIterator  begin,
InputIterator  end 
)
inline

◆ operator()() [1/2]

const GetDistance::Point & operator() ( const Point p,
bool  self_allowed 
) const
inline

◆ operator()() [2/2]

OutputIterator operator() ( const Point p,
bool  self_allowed,
OutputIterator  out 
) const
inline

◆ reset()

void reset ( void  )
inline

◆ set_number_of_neighbors()

void set_number_of_neighbors ( unsigned  k)
inline

◆ set_query_type()

void set_query_type ( ANN_query_type  query_type)
inline

◆ set_range()

void set_range ( const FT range)
inline