9 #ifndef MKNN_DATASET_H_
10 #define MKNN_DATASET_H_
16 #include "../metricknn_c.h"
87 bool free_domain_on_dataset_release);
155 MknnDataset *concatenate_dataset, int64_t num_subdataset);
166 int64_t posObject, int64_t *out_numSubdataset,
167 int64_t *out_posObjectInSubdataset);
190 MknnDataset *multiobject_dataset, int64_t num_subdataset);
MknnDataset * mknn_dataset_clone(MknnDataset *dataset)
Returns a new dataset with a copy of the each element in dataset.
Definition: dataset.c:115
void mknn_dataset_concatenate_getDatasetObject(MknnDataset *concatenate_dataset, int64_t posObject, int64_t *out_numSubdataset, int64_t *out_posObjectInSubdataset)
Given the number of an object returns two numbers: the number of the subdataset and the number of the...
Definition: dataset_concatenate.c:97
void mknn_dataset_release(MknnDataset *dataset)
Releases the dataset.
Definition: dataset.c:78
int64_t mknn_dataset_getNumObjects(MknnDataset *dataset)
Size of the dataset.
Definition: dataset.c:55
MknnDomain * mknn_dataset_getDomain(MknnDataset *dataset)
Returns the domain assigned to the dataset.
Definition: dataset.c:47
void mknn_dataset_set_free_domain_on_dataset_release(MknnDataset *dataset, bool free_domain_on_dataset_release)
Definition: dataset.c:71
void mknn_dataset_printObjectsTextFile(MknnDataset *dataset, const char *filename_write)
It prints the objects in the dataset in text format, i.e., converting them to string and using fprint...
Definition: dataset_save_restore.c:40
void mknn_dataset_save(MknnDataset *dataset, const char *filename_write)
The dataset is saved to a file.
Definition: dataset_save_restore.c:51
void mknn_dataset_pushObject(MknnDataset *dataset, void *object)
Adds an object to a dataset.
Definition: dataset.c:60
void * mknn_dataset_getCompactVectors(MknnDataset *dataset)
The objects in the dataset are stored in a single long array.
Definition: dataset.c:121
MknnDataset * mknn_dataset_restore(const char *filename_read)
Loads a dataset from a file.
Definition: dataset_save_restore.c:73
MknnDataset * mknn_dataset_concatenate_getSubDataset(MknnDataset *concatenate_dataset, int64_t num_subdataset)
Returns one of the subdatasets that produced this dataset.
Definition: dataset_concatenate.c:89
int64_t mknn_dataset_concatenate_getNumSubDatasets(MknnDataset *concatenate_dataset)
Returns the number of subdatasets that produced this dataset.
Definition: dataset_concatenate.c:83
bool mknn_dataset_get_free_domain_on_dataset_release(MknnDataset *dataset)
Definition: dataset.c:75
int64_t mknn_dataset_multiobject_getNumSubDatasets(MknnDataset *multiobject_dataset)
Returns the number of subdatasets that produced this dataset.
Definition: dataset_multiobject.c:75
void * mknn_dataset_custom_getDataPointer(MknnDataset *custom_dataset)
returns the pointer to the object used during the creation of the dataset
Definition: dataset.c:40
void * mknn_dataset_getObject(MknnDataset *dataset, int64_t pos)
Retrieves the object in position pos in dataset.
Definition: dataset.c:52
void mknn_dataset_printObjectsRawFile(MknnDataset *dataset, const char *filename_write)
It prints the objects in the dataset in binary format, i.e., using fwrite to write memory addresses...
Definition: dataset_save_restore.c:30
MknnDataset * mknn_dataset_multiobject_getSubDataset(MknnDataset *multiobject_dataset, int64_t num_subdataset)
Returns one of the subdatasets that produced this dataset.
Definition: dataset_multiobject.c:85