MetricKnn API
Fast Similarity Search using the Metric Space Approach
Public Member Functions | List of all members
mknn::DatasetCustom Class Referenceabstract

Abstract class that must be inherited to define a custom dataset. More...

#include <mknn_dataset_loader.hpp>

Public Member Functions

virtual long long getNumObjects ()=0
 Return the current size of the dataset. More...
 
virtual void * getObject (long long pos)=0
 Returns an object in the dataset. More...
 
virtual void pushObject (void *object)=0
 Adds an object to a dynamic dataset. More...
 

Detailed Description

Abstract class that must be inherited to define a custom dataset.

Member Function Documentation

virtual long long mknn::DatasetCustom::getNumObjects ( )
pure virtual

Return the current size of the dataset.

Returns
the number of objects stored in data_pointer
virtual void* mknn::DatasetCustom::getObject ( long long  pos)
pure virtual

Returns an object in the dataset.

Parameters
posthe position of the desired object, between 0 and num_objects-1.
Returns
the object stored in the position pos in data_pointer
virtual void mknn::DatasetCustom::pushObject ( void *  object)
pure virtual

Adds an object to a dynamic dataset.

Note that the object must be added to the dataset through Dataset::pushObject method in order to the index knows that the dataset has changed and must be updated.

Parameters
objectthe new object to add at the end of data_pointer.

The documentation for this class was generated from the following file:
Powered by Download MetricKnn