9 #ifndef MKNN_DATASET_LOADER_HPP_
10 #define MKNN_DATASET_LOADER_HPP_
12 #include "../metricknn_cpp.hpp"
34 virtual void *
getObject(
long long pos)= 0;
77 long long *out_posObjectInSubdataset);
121 bool delete_custom_dataset_on_dataset_release,
Domain domain);
162 long long num_vectors,
long long vector_num_dimensions,
163 const std::string vector_dimension_datatype);
175 const std::string datatype);
195 const std::vector<Dataset> &subdatasets);
217 long long num_positions);
230 double dimension_minValueIncluded,
231 double dimension_maxValueNotIncluded,
const std::string datatype);
244 const std::vector<Dataset> &subdatasets);
static Dataset ParseVectorFile(std::string filename, const std::string datatype)
Creates a new dataset by reading a text file with vectors.
static Dataset SubsetPositions(Dataset &superdataset, long long *positions, long long num_positions)
Creates a new dataset which is a subset of a bigger dataset.
static DatasetConcatenate Concatenate(const std::vector< Dataset > &subdatasets)
Creates a new dataset which is the concatenation of one or more datasets.
long long getNumSubDatasets()
Returns the number of subdatasets.
Abstract class that must be inherited to define a custom dataset.
Definition: mknn_dataset_loader.hpp:19
Dataset getSubDataset(long long num_subdataset)
Returns one of the subdatasets that produced this dataset.
Dataset getSubDataset(long long num_subdataset)
Returns one of the subdatasets that produced this dataset.
static Dataset ParseStringsFile(std::string filename)
Creates a new dataset by reading a text file with strings.
Represents a set of objects of any type.
Definition: mknn_dataset.hpp:23
A dataset returned by DatasetLoader::MultiObject.
Definition: mknn_dataset_loader.hpp:84
virtual void * getObject(long long pos)=0
Returns an object in the dataset.
static Dataset Empty(Domain domain)
Creates a new empty dataset that can dynamically grow as new objects are added.
Definition: mevaluation_answers.hpp:18
long long getNumSubDatasets()
Returns the number of subdatasets.
static Dataset PointerCompactVectors(void *vectors_header, long long num_vectors, long long vector_num_dimensions, const std::string vector_dimension_datatype)
Creates a new dataset from a data array.
A dataset returned by DatasetLoader::Concatenate.
Definition: mknn_dataset_loader.hpp:52
Different Loaders.
Definition: mknn_dataset_loader.hpp:105
static DatasetMultiObject MultiObject(const std::vector< Dataset > &subdatasets)
Creates a new dataset where each object is a multi-object.
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...
virtual void pushObject(void *object)=0
Adds an object to a dynamic dataset.
static Dataset PointerArray(void **object_array, long long num_objects, Domain domain)
Creates a new dataset from an array of objects.
static Dataset Custom(DatasetCustom *custom_dataset, bool delete_custom_dataset_on_dataset_release, Domain domain)
Creates a new custom dataset.
static Dataset UniformRandomVectors(long long num_objects, long long dimension, double dimension_minValueIncluded, double dimension_maxValueNotIncluded, const std::string datatype)
Creates a new dataset with random vectors of the given datatype.
virtual long long getNumObjects()=0
Return the current size of the dataset.
A domain represents the type of object that are contained in a dataset.
Definition: mknn_domain.hpp:33
static Dataset SubsetSegment(Dataset &superdataset, long long position_start, long long length)
Creates a new dataset which is a subset of a bigger dataset.