MetricKnn API
Fast Similarity Search using the Metric Space Approach
|
A dataset returned by DatasetLoader::Concatenate. More...
#include <mknn_dataset_loader.hpp>
Inherits mknn::Dataset.
Public Member Functions | |
long long | getNumSubDatasets () |
Returns the number of subdatasets. More... | |
Dataset | getSubDataset (long long num_subdataset) |
Returns one of the subdatasets that produced this dataset. More... | |
void | getDatasetObject (long long posObject, long long *out_numSubdataset, long long *out_posObjectInSubdataset) |
Given the number of an object returns two numbers: the number of the subdataset and the number of the object in that subdataset which corresponds to the object in the concatenated dataset. More... | |
Public Member Functions inherited from mknn::Dataset | |
Dataset () | |
Default constructor. | |
virtual | ~Dataset () |
Default destructor. | |
Dataset (const Dataset &other) | |
Copy constructor. | |
Dataset & | operator= (const Dataset &other) |
Assignment operator. | |
long long | getNumObjects () |
Size of the dataset. More... | |
void * | getObject (long long pos) |
Retrieves the object in position pos in dataset . More... | |
void | pushObject (void *object) |
Adds an object to a dataset. More... | |
Domain | getDomain () |
Returns the domain assigned to the dataset. More... | |
void * | getCompactVectors () |
The objects in the dataset are stored in a single long array. More... | |
void | printObjectsToTextFile (std::string filename_write) |
It saves the objects in a dataset in text format. More... | |
void | save (std::string filename_write) |
The dataset is saved to a file. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mknn::Dataset | |
static Dataset | restore (std::string filename_read) |
Loads a dataset from a file. More... | |
Protected Attributes inherited from mknn::Dataset | |
std::unique_ptr< Impl > | pimpl |
opaque object | |
A dataset returned by DatasetLoader::Concatenate.
void mknn::DatasetConcatenate::getDatasetObject | ( | long long | posObject, |
long long * | out_numSubdataset, | ||
long long * | out_posObjectInSubdataset | ||
) |
Given the number of an object returns two numbers: the number of the subdataset and the number of the object in that subdataset which corresponds to the object in the concatenated dataset.
The dataset must created by DatasetLoader::Concatenate.
posObject | the number of the object between 0 and getNumObjects - 1 |
out_numSubdataset | returns the number of the dataset. It can be used in DatasetConcatenate::getSubDataset |
out_posObjectInSubdataset | returns the number of the object in the subdataset. It can be used in Dataset::getObject. |
long long mknn::DatasetConcatenate::getNumSubDatasets | ( | ) |
Returns the number of subdatasets.
Dataset mknn::DatasetConcatenate::getSubDataset | ( | long long | num_subdataset | ) |
Returns one of the subdatasets that produced this dataset.
The dataset must created by DatasetLoader::Concatenate.
num_subdataset | from 0 to getNumSubDatasets() - 1 |