Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_ANN_meta< RandomizedANN, IsLowerPoint > Class Template Reference

Nearest neighbor engine designed for metric spaces. More...

#include <ANN_meta.hpp>

Public Types

enum  ANN_query_type { ANN_BY_K = RandomizedANN::ANN_BY_K , ANN_BY_RANGE = RandomizedANN::ANN_BY_RANGE }
 
typedef T_ANN_meta< RandomizedANN, IsLowerPoint > Self
 
typedef RandomizedANN::FT FT
 
typedef RandomizedANN::Point Point
 
typedef RandomizedANN::Distance Distance
 
typedef RandomizedANN::ANN_query_type Randomized_ANN_query_type
 

Public Member Functions

 T_ANN_meta (unsigned n=10, const RandomizedANN &ann=RandomizedANN())
 
 T_ANN_meta (Distance &distance, unsigned n=10)
 
 ~T_ANN_meta (void)
 
unsigned get_number_of_databases (void) const
 
const RandomizedANN & get_ith_database (unsigned i) const
 
RandomizedANN & get_ith_database (unsigned i)
 
const Pointget_point (unsigned i) const
 
void insert (const Point &p)
 
template<class InputIterator >
void insert (InputIterator begin, InputIterator end)
 
void clear (void)
 
void reset (void)
 
void set_query_type (ANN_query_type query_type)
 
void set_number_of_neighbors (unsigned k)
 
void set_range (const FT &range)
 
unsigned get_number_of_neighbors (void) const
 
const FTget_range (void) const
 
FT get_distance (const Point &p, const Point &q) const
 
unsigned get_number_of_points (unsigned i=0) const
 
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 RandomizedANN, class IsLowerPoint = std::less<typename RandomizedANN::Point>>
class SBL::GT::T_ANN_meta< RandomizedANN, IsLowerPoint >

Nearest neighbor engine designed for metric spaces.

...

Member Typedef Documentation

◆ Distance

typedef RandomizedANN::Distance Distance

◆ FT

typedef RandomizedANN::FT FT

◆ Point

typedef RandomizedANN::Point Point

◆ Randomized_ANN_query_type

typedef RandomizedANN::ANN_query_type Randomized_ANN_query_type

◆ Self

typedef T_ANN_meta<RandomizedANN, IsLowerPoint> Self

Member Enumeration Documentation

◆ ANN_query_type

Enumerator
ANN_BY_K 
ANN_BY_RANGE 

Constructor & Destructor Documentation

◆ T_ANN_meta() [1/2]

T_ANN_meta ( unsigned  n = 10,
const RandomizedANN &  ann = RandomizedANN() 
)
inline

◆ T_ANN_meta() [2/2]

T_ANN_meta ( Distance distance,
unsigned  n = 10 
)
inline

◆ ~T_ANN_meta()

~T_ANN_meta ( void  )
inline

Member Function Documentation

◆ clear()

void clear ( void  )
inline

◆ get_distance()

T_ANN_meta< RandomizedANN, IsLowerPoint >::FT get_distance ( const Point p,
const Point q 
) const
inline

◆ get_ith_database() [1/2]

RandomizedANN & get_ith_database ( unsigned  i)
inline

◆ get_ith_database() [2/2]

const RandomizedANN & get_ith_database ( unsigned  i) const
inline

◆ get_nearest_neighbor()

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

◆ get_number_of_databases()

unsigned get_number_of_databases ( void  ) const
inline

◆ get_number_of_neighbors()

unsigned get_number_of_neighbors ( void  ) const
inline

◆ get_number_of_points()

unsigned get_number_of_points ( unsigned  i = 0) const
inline

◆ get_point()

const T_ANN_meta< RandomizedANN, IsLowerPoint >::Point & get_point ( unsigned  i) const
inline

◆ get_range()

const T_ANN_meta< RandomizedANN, IsLowerPoint >::FT & get_range ( void  ) 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 T_ANN_meta< RandomizedANN, IsLowerPoint >::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