MetricKnn API
Fast Similarity Search using the Metric Space Approach
Static Public Member Functions | Static Public Attributes | List of all members
mknn::Datatype Class Reference

Static methods for datatype constants. More...

#include <mknn_datatype.hpp>

Static Public Member Functions

static long long getNumBytes (const std::string datatype)
 Returns the size in bytes of the given datatype (a number between 1 and 8). More...
 
static bool isSignedInteger (const std::string datatype)
 Returns whether the given datatype is one of the signed integer types. More...
 
static bool isUnsignedInteger (const std::string datatype)
 Returns whether the given datatype is one of the unsigned integer types. More...
 
static bool isFloatingPoint (const std::string datatype)
 Returns whether the given datatype is one of the floating point types. More...
 

Static Public Attributes

static const std::string SIGNED_INTEGER_8bits
 Integer 8 bits-length signed. More...
 
static const std::string SIGNED_INTEGER_16bits
 Integer 16 bits-length signed. More...
 
static const std::string SIGNED_INTEGER_32bits
 Integer 32 bits-length signed. More...
 
static const std::string SIGNED_INTEGER_64bits
 Integer 64 bits-length signed. More...
 
static const std::string UNSIGNED_INTEGER_8bits
 Integer 8 bits-length unsigned. More...
 
static const std::string UNSIGNED_INTEGER_16bits
 Integer 16 bits-length unsigned. More...
 
static const std::string UNSIGNED_INTEGER_32bits
 Integer 32 bits-length unsigned. More...
 
static const std::string UNSIGNED_INTEGER_64bits
 Integer 64 bits-length unsigned. More...
 
static const std::string FLOATING_POINT_32bits
 Floating point 32 bits-length. More...
 
static const std::string FLOATING_POINT_64bits
 Floating point 64 bits-length. More...
 

Detailed Description

Static methods for datatype constants.

Member Function Documentation

static long long mknn::Datatype::getNumBytes ( const std::string  datatype)
static

Returns the size in bytes of the given datatype (a number between 1 and 8).

Parameters
datatypeone of the constants
Returns
size in bytes of the given datatype.
static bool mknn::Datatype::isFloatingPoint ( const std::string  datatype)
static

Returns whether the given datatype is one of the floating point types.

Parameters
datatypeone of the constants
Returns
true if datatype is FLOATING_POINT_32bits or FLOATING_POINT_64bits, false otherwise.
static bool mknn::Datatype::isSignedInteger ( const std::string  datatype)
static

Returns whether the given datatype is one of the signed integer types.

Parameters
datatypeone of the constants
Returns
true if datatype is SIGNED_INTEGER_8bits or SIGNED_INTEGER_16bits or SIGNED_INTEGER_32bits or SIGNED_INTEGER_64bits, false otherwise.
static bool mknn::Datatype::isUnsignedInteger ( const std::string  datatype)
static

Returns whether the given datatype is one of the unsigned integer types.

Parameters
datatypeone of the constants
Returns
true if datatype is UNSIGNED_INTEGER_8bits or UNSIGNED_INTEGER_16bits or UNSIGNED_INTEGER_32bits or UNSIGNED_INTEGER_64bits, false otherwise.

Member Data Documentation

const std::string mknn::Datatype::FLOATING_POINT_32bits
static

Floating point 32 bits-length.

Corresponds to standard C type float.

const std::string mknn::Datatype::FLOATING_POINT_64bits
static

Floating point 64 bits-length.

Corresponds to standard C type double.

const std::string mknn::Datatype::SIGNED_INTEGER_16bits
static

Integer 16 bits-length signed.

Corresponds to int16_t (see stdint.h).

const std::string mknn::Datatype::SIGNED_INTEGER_32bits
static

Integer 32 bits-length signed.

Corresponds to int32_t (see stdint.h).

const std::string mknn::Datatype::SIGNED_INTEGER_64bits
static

Integer 64 bits-length signed.

Corresponds to long long (see stdint.h).

const std::string mknn::Datatype::SIGNED_INTEGER_8bits
static

Integer 8 bits-length signed.

Corresponds to int8_t (see stdint.h).

const std::string mknn::Datatype::UNSIGNED_INTEGER_16bits
static

Integer 16 bits-length unsigned.

Corresponds to uint16_t (see stdint.h).

const std::string mknn::Datatype::UNSIGNED_INTEGER_32bits
static

Integer 32 bits-length unsigned.

Corresponds to uint32_t (see stdint.h).

const std::string mknn::Datatype::UNSIGNED_INTEGER_64bits
static

Integer 64 bits-length unsigned.

Corresponds to ulong long (see stdint.h).

const std::string mknn::Datatype::UNSIGNED_INTEGER_8bits
static

Integer 8 bits-length unsigned.

Corresponds to uint8_t (see stdint.h).


The documentation for this class was generated from the following file:
Powered by Download MetricKnn