Public Types | Public Member Functions | Private Attributes | List of all members
CNearestNeighbor Class Reference

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

#include <NearestNeighbor.h>

Inheritance diagram for CNearestNeighbor:
Inheritance graph
[legend]

Public Types

enum  ComputationMethod { eBruteForce, eKdTree, eBruteForceGPU }
 

Public Member Functions

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

Private Attributes

bool m_bTrained
 
ComputationMethod m_method
 
int m_nDataSets
 
int m_nDimension
 
int m_nKdTreeMaxLeaves
 
float * m_pData
 
CKdTreem_pKdTree
 

Detailed Description

Class containing different implementations of the nearest neighbor classificator.

Definition at line 71 of file NearestNeighbor.h.

Member Enumeration Documentation

◆ ComputationMethod

Enumerator
eBruteForce 
eKdTree 
eBruteForceGPU 

Definition at line 74 of file NearestNeighbor.h.

Constructor & Destructor Documentation

◆ CNearestNeighbor()

CNearestNeighbor::CNearestNeighbor ( ComputationMethod  method)

Definition at line 63 of file NearestNeighbor.cpp.

◆ ~CNearestNeighbor()

CNearestNeighbor::~CNearestNeighbor ( )

Definition at line 74 of file NearestNeighbor.cpp.

Member Function Documentation

◆ Classify() [1/2]

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

Implements CClassificatorInterface.

Definition at line 154 of file NearestNeighbor.cpp.

◆ Classify() [2/2]

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.

◆ SetKdTreeMaxLeaves()

void CNearestNeighbor::SetKdTreeMaxLeaves ( int  nKdTreeMaxLeaves)
inline

Definition at line 89 of file NearestNeighbor.h.

◆ Train()

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

Implements CClassificatorInterface.

Definition at line 91 of file NearestNeighbor.cpp.

Member Data Documentation

◆ m_bTrained

bool CNearestNeighbor::m_bTrained
private

Definition at line 102 of file NearestNeighbor.h.

◆ m_method

ComputationMethod CNearestNeighbor::m_method
private

Definition at line 103 of file NearestNeighbor.h.

◆ m_nDataSets

int CNearestNeighbor::m_nDataSets
private

Definition at line 98 of file NearestNeighbor.h.

◆ m_nDimension

int CNearestNeighbor::m_nDimension
private

Definition at line 97 of file NearestNeighbor.h.

◆ m_nKdTreeMaxLeaves

int CNearestNeighbor::m_nKdTreeMaxLeaves
private

Definition at line 101 of file NearestNeighbor.h.

◆ m_pData

float* CNearestNeighbor::m_pData
private

Definition at line 99 of file NearestNeighbor.h.

◆ m_pKdTree

CKdTree* CNearestNeighbor::m_pKdTree
private

Definition at line 100 of file NearestNeighbor.h.


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


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Feb 28 2022 21:44:01