Krotos Modules 3
Loading...
Searching...
No Matches
krotos::NearestNeighbourSearch2D Class Reference

#include <NearestNeighbourSearch2D.h>

Public Member Functions

 NearestNeighbourSearch2D (int max_elements)
 
 ~NearestNeighbourSearch2D ()
 
void addDatasetItem (float x, float y)
 
int knnQuery (float x, float y)
 
std::vector< int > knnQuery (float x, float y, int k)
 

Private Attributes

Dataset2D dataset
 
std::unique_ptr< hnswlib::BruteforceSearch< float > > alg
 
hnswlib::SpaceInterface< float > * space
 
std::unique_ptr< hnswlib::L2Spacem_spaceInstance
 

Constructor & Destructor Documentation

◆ NearestNeighbourSearch2D()

krotos::NearestNeighbourSearch2D::NearestNeighbourSearch2D ( int max_elements)

◆ ~NearestNeighbourSearch2D()

krotos::NearestNeighbourSearch2D::~NearestNeighbourSearch2D ( )

Member Function Documentation

◆ addDatasetItem()

void krotos::NearestNeighbourSearch2D::addDatasetItem ( float x,
float y )

◆ knnQuery() [1/2]

int krotos::NearestNeighbourSearch2D::knnQuery ( float x,
float y )

◆ knnQuery() [2/2]

std::vector< int > krotos::NearestNeighbourSearch2D::knnQuery ( float x,
float y,
int k )

Member Data Documentation

◆ alg

std::unique_ptr<hnswlib::BruteforceSearch<float> > krotos::NearestNeighbourSearch2D::alg
private

◆ dataset

Dataset2D krotos::NearestNeighbourSearch2D::dataset
private

◆ m_spaceInstance

std::unique_ptr<hnswlib::L2Space> krotos::NearestNeighbourSearch2D::m_spaceInstance
private

◆ space

hnswlib::SpaceInterface<float>* krotos::NearestNeighbourSearch2D::space
private

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