dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
KNN Class Reference

K-Nearest Neighbours Algorithm. More...

#include <KNN.h>

Public Member Functions

neighVector run (const Descriptor &individual, const vector< Descriptor > &neighbours, Distance< float > *metric, const int &k=3)
 Computes the KNN algorithm for the individual Returns the k nearest neighbours Ss in a vector. More...
 
neighMatrix run (const vector< Descriptor > &population, Distance< float > *metric, const int &k=3)
 Computes the KNN for the entire vector of individuals given. More...
 

Detailed Description

K-Nearest Neighbours Algorithm.

Member Function Documentation

◆ run() [1/2]

neighVector KNN::run ( const Descriptor &  individual,
const vector< Descriptor > &  neighbours,
Distance< float > *  metric,
const int &  k = 3 
)

Computes the KNN algorithm for the individual Returns the k nearest neighbours Ss in a vector.

Template Parameters
T
S
Parameters
individual
neighbours
metric
k
Returns
vector

◆ run() [2/2]

neighMatrix KNN::run ( const vector< Descriptor > &  population,
Distance< float > *  metric,
const int &  k = 3 
)

Computes the KNN for the entire vector of individuals given.

Template Parameters
S
T
Parameters
population
metric
k
Returns
neighMatrix<T>

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