A.I.M.S algorithms


aims::knn::Knn Class Referenceabstract

#include <aims/math/knn.h>

Inheritance diagram for aims::knn::Knn:
Collaboration diagram for aims::knn::Knn:

Public Member Functions

 Knn (Database &db, unsigned int k, Distance *distance=new SquaredEuclidianDistance())
 
virtual ~Knn ()
 
virtual std::pair< std::vector
< unsigned int >, std::vector
< double > > 
find (const std::vector< double > &v)=0
 

Protected Attributes

Database_db
 database wrapper of data More...
 
unsigned int _k
 k : number of nearest neighbours More...
 
Distance_distance
 distance used in nearest neighbours computations More...
 
int _distance_n
 number of computed distance More...
 

Detailed Description

Definition at line 521 of file knn.h.

Constructor & Destructor Documentation

aims::knn::Knn::Knn ( Database db,
unsigned int  k,
Distance distance = new SquaredEuclidianDistance() 
)
inline

Definition at line 524 of file knn.h.

virtual aims::knn::Knn::~Knn ( )
inlinevirtual

Definition at line 527 of file knn.h.

Member Function Documentation

virtual std::pair<std::vector<unsigned int>, std::vector<double> > aims::knn::Knn::find ( const std::vector< double > &  v)
pure virtual

Member Data Documentation

Database& aims::knn::Knn::_db
protected

database wrapper of data

Definition at line 534 of file knn.h.

Distance* aims::knn::Knn::_distance
protected

distance used in nearest neighbours computations

Definition at line 538 of file knn.h.

int aims::knn::Knn::_distance_n
protected

number of computed distance

Definition at line 540 of file knn.h.

unsigned int aims::knn::Knn::_k
protected

k : number of nearest neighbours

Definition at line 536 of file knn.h.


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