9 #ifndef MKNN_DOMAIN_HPP_
10 #define MKNN_DOMAIN_HPP_
12 #include "../metricknn_cpp.hpp"
91 std::string dimension_datatype);
297 std::unique_ptr<Impl>
pimpl;
static Domain newVector(long long num_dimensions, std::string dimension_datatype)
Creates a new domain object that represents a vector of some fixed dimension and datatype.
bool isGeneralDomainMultiObject()
Returns true if the general domain is multi-object.
static Domain newString()
Creates a new domain object that represents strings.
long long getMultiobjectLength()
The number of objects in the multi-object, i.e., the size of the void** array.
Domain()
Default constructor.
long long getCustomObjectId()
The object printer converts an object from a given domain to its string representation.
Definition: mknn_printer.hpp:20
std::unique_ptr< Impl > pimpl
opaque object
Definition: mknn_domain.hpp:293
bool isGeneralDomainString()
Returns true if the general domain is string.
static bool testEqual(Domain &domain1, Domain &domain2)
Two domains are equal if they coincide in their general domains and all their attributes.
static const std::string GENERAL_DOMAIN_MULTIOBJECT
General Domain of Multi-Object.
Definition: mknn_domain.hpp:53
static Domain newCustomObject(long long custom_id, void *custom_data)
Creates a new domain object that represents a multi-object, i.e., the combination of many objects in ...
Domain & operator=(const Domain &other)
Assignment operator.
Represents a set of objects of any type.
Definition: mknn_dataset.hpp:23
void * getCustomObjectData()
static Domain newParseString(std::string string_domain)
Creates a new domain object by parsing a string representation generated by toString.
bool isGeneralDomainCustomObject()
Returns true if the general domain is custom-object.
static const std::string GENERAL_DOMAIN_VECTOR
General Domain of Vectors.
Definition: mknn_domain.hpp:47
static Domain newClone(Domain domain)
Duplicates a domain.
Definition: mevaluation_answers.hpp:18
Different Loaders.
Definition: mknn_dataset_loader.hpp:105
std::string getGeneralDomain()
Returns the general domain of the given domain object.
static const std::string GENERAL_DOMAIN_STRING
General Domain of Strings.
Definition: mknn_domain.hpp:40
static const std::string GENERAL_DOMAIN_CUSTOMOBJECT
General Domain of Custom Objects.
Definition: mknn_domain.hpp:59
long long getVectorSizeInBytes()
Returns total size in bytes for one vector, which corresponds to dimensions * sizeof(datatype), where the size of a datatype is given by Datatype::getNumBytes.
std::string getVectorDimensionDataType()
Returns the dimension datatype of the vectors.
The Distance is the object with the definition of the method for comparing objects.
Definition: mknn_distance.hpp:59
Domain & getMultiobjectSubDomain(long long num_subdomain)
The domain of each object in the multi-object.
virtual ~Domain()
Default destructor.
static bool testEqualExceptDatatype(Domain &domain1, Domain &domain2)
Two domains are equalExceptDatatype if they coincide in their general domains and all their attribute...
static Domain newMultiobject(const std::vector< Domain > &subdomains)
Creates a new domain object that represents a multi-object, i.e., the combination of many objects in ...
std::string toString()
Creates a text representation of the domain and its attributes.
long long getVectorNumDimensions()
Returns the number of dimensions of the vectors.
bool isGeneralDomainVector()
Returns true if the general domain is vector.
A domain represents the type of object that are contained in a dataset.
Definition: mknn_domain.hpp:33