IVT
CNearestNeighbor Class Reference

Class containing different implementations of the nearest neighbor classificator. More...

#include <NearestNeighbor.h>

Inheritance diagram for CNearestNeighbor:
CClassificatorInterface

Public Types

enum  ComputationMethod { eBruteForce, eKdTree, eBruteForceGPU }
 

Public Member Functions

 CNearestNeighbor (ComputationMethod method)
 
 ~CNearestNeighbor ()
 
void SetKdTreeMaxLeaves (int nKdTreeMaxLeaves)
 
bool Train (const float *pData, int nDimension, int nDataSets)
 
int Classify (const float *pQuery, int nDimension, float &fResultError)
 
bool Classify (const float *pQueries, int nDimension, int nQueries, int *pResults, float *pResultErrors)
 
- Public Member Functions inherited from CClassificatorInterface
virtual ~CClassificatorInterface ()
 

Detailed Description

Class containing different implementations of the nearest neighbor classificator.

Definition at line 71 of file NearestNeighbor.h.

Member Enumeration Documentation

Enumerator
eBruteForce 
eKdTree 
eBruteForceGPU 

Definition at line 74 of file NearestNeighbor.h.

Constructor & Destructor Documentation

CNearestNeighbor::CNearestNeighbor ( ComputationMethod  method)

Definition at line 63 of file NearestNeighbor.cpp.

CNearestNeighbor::~CNearestNeighbor ( )

Definition at line 74 of file NearestNeighbor.cpp.

Member Function Documentation

int CNearestNeighbor::Classify ( const float *  pQuery,
int  nDimension,
float &  fResultError 
)
virtual

Implements CClassificatorInterface.

Definition at line 154 of file NearestNeighbor.cpp.

bool CNearestNeighbor::Classify ( const float *  pQueries,
int  nDimension,
int  nQueries,
int *  pResults,
float *  pResultErrors 
)
virtual

Implements CClassificatorInterface.

Definition at line 221 of file NearestNeighbor.cpp.

void CNearestNeighbor::SetKdTreeMaxLeaves ( int  nKdTreeMaxLeaves)
inline

Definition at line 89 of file NearestNeighbor.h.

bool CNearestNeighbor::Train ( const float *  pData,
int  nDimension,
int  nDataSets 
)
virtual

Implements CClassificatorInterface.

Definition at line 91 of file NearestNeighbor.cpp.


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