aimsalgo  5.1.2
Neuroimaging image processing
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 543 of file knn.h.

Constructor & Destructor Documentation

◆ Knn()

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

Definition at line 546 of file knn.h.

◆ ~Knn()

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

Definition at line 549 of file knn.h.

Member Function Documentation

◆ find()

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

Member Data Documentation

◆ _db

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

database wrapper of data

Definition at line 556 of file knn.h.

◆ _distance

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

distance used in nearest neighbours computations

Definition at line 560 of file knn.h.

◆ _distance_n

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

number of computed distance

Definition at line 562 of file knn.h.

◆ _k

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

k : number of nearest neighbours

Definition at line 558 of file knn.h.


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