10 #define MKNN_DOMAIN_H_
16 #include "../metricknn_c.h"
99 void *vectors_array, int64_t pos_vector);
130 bool free_subdomains_on_domain_release);
149 int64_t num_subdomain);
bool mknn_domain_isGeneralDomainVector(MknnDomain *domain)
Returns true if the general domain is vector.
Definition: domain.c:74
bool mknn_domain_isGeneralDomainString(MknnDomain *domain)
Returns true if the general domain is string.
Definition: domain.c:77
void * mknn_domain_vector_createNewEmptyVectors(MknnDomain *domain, int64_t num_vectors)
Creates an array with the size to store consecutive num_vectors.
Definition: domain.c:96
int64_t mknn_domain_vector_getVectorLengthInBytes(MknnDomain *domain)
Returns total size in bytes for one vector, which corresponds to dimensions * sizeof(datatype), where the size of a datatype is given by mknn_datatype_sizeof.
Definition: domain.c:93
MknnDatatype mknn_domain_vector_getDimensionDataType(MknnDomain *domain)
Returns the dimension datatype of the vectors.
Definition: domain.c:90
char * mknn_domain_toString(MknnDomain *domain)
Creates a text representation of the domain and its attributes.
Definition: domain.c:175
bool mknn_domain_testEqual(MknnDomain *domain1, MknnDomain *domain2)
Two domains are equal if they coincide in their general domains and all their attributes.
Definition: domain.c:166
int64_t mknn_domain_multiobject_getLength(MknnDomain *domain)
The number of objects in the multi-object, i.e., the size of the void** array.
Definition: domain.c:105
int64_t mknn_domain_custom_getId(MknnDomain *domain)
Definition: domain.c:114
int64_t mknn_domain_vector_getNumDimensions(MknnDomain *domain)
Returns the number of dimensions of the vectors.
Definition: domain.c:87
MknnDomain * mknn_domain_newMultiobject(int64_t length, MknnDomain **subdomains, bool free_subdomains_on_domain_release)
Creates a new domain object that represents a multi-object, i.e., the combination of many objects in ...
Definition: domain.c:47
Represents a broad type of objects, like strings, vectors, etc.
Definition: metricknn_c.h:28
void * mknn_domain_vector_getVectorInArray(MknnDomain *domain, void *vectors_array, int64_t pos_vector)
Definition: domain.c:100
bool mknn_domain_testEqualExceptDatatype(MknnDomain *domain1, MknnDomain *domain2)
Two domains are equalExceptDatatype if they coincide in their general domains and all their attribute...
Definition: domain.c:170
bool mknn_domain_isGeneralDomainCustomObject(MknnDomain *domain)
Returns true if the general domain is custom-object.
Definition: domain.c:84
MknnDomain * mknn_domain_multiobject_getSubDomain(MknnDomain *domain, int64_t num_subdomain)
The domain of each object in the multi-object.
Definition: domain.c:108
MknnDomain * mknn_domain_newClone(MknnDomain *domain)
Duplicates a domain.
Definition: domain.c:238
bool mknn_domain_isGeneralDomainMultiObject(MknnDomain *domain)
Returns true if the general domain is multi-object.
Definition: domain.c:80
MknnDomain * mknn_domain_newCustomObject(int64_t custom_id, void *custom_data)
Creates a new domain object that represents a multi-object, i.e., the combination of many objects in ...
Definition: domain.c:60
void mknn_domain_release(MknnDomain *domain)
Releases the memory used by the domain.
Definition: domain.c:121
MknnGeneralDomain mknn_domain_getGeneralDomain(MknnDomain *domain)
Returns the general domain of the given domain object.
Definition: domain.c:68
MknnDomain * mknn_domain_newString()
Creates a new domain object that represents strings.
Definition: domain.c:29
MknnDomain * mknn_domain_newParseString(const char *string_domain)
Creates a new domain object by parsing a string representation generated by mknn_domain_toString.
Definition: domain.c:204
Represents a constant for a datatype, like integer 8bits, float 32 bits, etc.
Definition: metricknn_c.h:35
void * mknn_domain_custom_getData(MknnDomain *domain)
Definition: domain.c:117
MknnDomain * mknn_domain_newVector(int64_t num_dimensions, MknnDatatype dimension_datatype)
Creates a new domain object that represents a vector of some fixed dimension and datatype.
Definition: domain.c:35