9 #ifndef MKNN_PARAMS_HPP_
10 #define MKNN_PARAMS_HPP_
12 #include "../metricknn_cpp.hpp"
79 void addString(std::string name, std::string value);
88 void addDouble(std::string name,
double value);
97 void addInt(std::string name,
long long value);
106 void addBool(std::string name,
bool value);
116 void addObject(std::string name,
void *value);
147 long long getInt(std::string name);
155 bool getBool(std::string name);
212 std::unique_ptr<Impl>
pimpl;
273 void addString(std::string name, std::string value);
282 void addDouble(std::string name,
double value);
291 void addInt(std::string name,
long long value);
300 void addBool(std::string name,
bool value);
310 void addObject(std::string name,
void *value);
341 long long getInt(std::string name);
349 bool getBool(std::string name);
406 std::unique_ptr<Impl>
pimpl;
437 long long max_threads, std::string parameters_string);
472 void addString(std::string name, std::string value);
481 void addDouble(std::string name,
double value);
490 void addInt(std::string name,
long long value);
499 void addBool(std::string name,
bool value);
509 void addObject(std::string name,
void *value);
540 long long getInt(std::string name);
548 bool getBool(std::string name);
570 void setKnn(
long long knn);
627 std::unique_ptr<Impl>
pimpl;
bool getBool(std::string name)
Returns a boolean value.
Stores parameters in an internal map, which associates a names with its value.
Definition: mknn_params.hpp:21
Stores parameters in an internal map, which associates a names with its value.
Definition: mknn_params.hpp:223
void addBool(std::string name, bool value)
Adds an boolean value to the parameters.
void * getObject(std::string name)
Returns a object reference.
bool getBool(std::string name)
Returns a boolean value.
DistanceParams()
Default constructor.
void addInt(std::string name, long long value)
Adds an integer number to the parameters.
MetricKnn provides a set of pre-defined distances.
Definition: mknn_predefined_distance.hpp:30
void setIndexId(std::string id_index)
long long getInt(std::string name)
Returns an integer number.
void parseString(std::string parameters_string)
Parses a string in the format: ID_INDEX,parameter1=value1,parameter2=value2
long long getMaxThreads()
void addDouble(std::string name, double value)
Adds a floating point number to the parameters.
void setDistanceId(std::string id_dist)
std::unique_ptr< Impl > pimpl
opaque object
Definition: mknn_params.hpp:623
long long getInt(std::string name)
Returns an integer number.
void addInt(std::string name, long long value)
Adds an integer number to the parameters.
void addObject(std::string name, void *value)
Adds an object number to the parameters.
std::string getString(std::string name)
Returns a string value.
double getDouble(std::string name)
Returns a floating-point number.
void copyAll(ResolverParams ¶ms_from)
Copies all the key-values pairs in params_from and adds them to params_to.
std::string toString()
Returns a string with the parameters which can be parsed.
ResolverParams()
Default constructor.
void addBool(std::string name, bool value)
Adds an boolean value to the parameters.
virtual ~DistanceParams()
Default destructor.
A Index represents the index structure.
Definition: mknn_index.hpp:45
virtual ~ResolverParams()
Default destructor.
void copyAll(DistanceParams ¶ms_from)
Copies all the key-values pairs in params_from and adds them to params_to.
void * getObject(std::string name)
Returns a object reference.
Stores parameters in an internal map, which associates a names with its value.
Definition: mknn_params.hpp:417
void addBool(std::string name, bool value)
Adds an boolean value to the parameters.
IndexParams()
Default constructor.
void setMaxThreads(long long max_threads)
Sets the maximum number of threads to be used by a resolver.
void addObject(std::string name, void *value)
Adds an object number to the parameters.
static IndexParams newParseString(std::string parameters_string)
Creates an empty object and set parameters by calling method parseString.
std::string getString(std::string name)
Returns a string value.
static ResolverParams newEmpty()
Creates an empty object.
double getDouble(std::string name)
Returns a floating-point number.
DistanceParams & operator=(const DistanceParams &other)
Assignment operator.
void parseString(std::string parameters_string)
Parses a string in the format: ID_DISTANCE,parameter1=value1,parameter2=value2
ResolverParams & operator=(const ResolverParams &other)
Assignment operator.
void addDouble(std::string name, double value)
Adds a floating point number to the parameters.
Definition: mevaluation_answers.hpp:18
void copyAll(IndexParams ¶ms_from)
Copies all the key-values pairs in params_from and adds them to params_to.
static DistanceParams newParseString(std::string parameters_string)
Creates an empty object and set parameters by calling method parseString.
void setRange(double range)
Sets the range parameter for resolvers in range searches.
void addDouble(std::string name, double value)
Adds a floating point number to the parameters.
IndexParams & operator=(const IndexParams &other)
Assignment operator.
std::string toString()
Returns a string with the parameters which can be parsed.
The Distance is the object with the definition of the method for comparing objects.
Definition: mknn_distance.hpp:59
std::unique_ptr< Impl > pimpl
opaque object
Definition: mknn_params.hpp:208
void addObject(std::string name, void *value)
Adds an object number to the parameters.
static ResolverParams newParseString(long long knn, double range, long long max_threads, std::string parameters_string)
Creates an empty object and set parameters by calling methods: setKnn, setRange, setMaxThreads, parseString.
std::string toString()
Returns a string with the parameters which can be parsed.
long long getInt(std::string name)
Returns an integer number.
void setKnn(long long knn)
Sets the K parameter for resolvers in k-NN searches.
virtual ~IndexParams()
Default destructor.
void addInt(std::string name, long long value)
Adds an integer number to the parameters.
std::string getString(std::string name)
Returns a string value.
void addString(std::string name, std::string value)
Adds a string to the parameters.
std::unique_ptr< Impl > pimpl
opaque object
Definition: mknn_params.hpp:402
void addString(std::string name, std::string value)
Adds a string to the parameters.
double getDouble(std::string name)
Returns a floating-point number.
std::string getDistanceId()
void addString(std::string name, std::string value)
Adds a string to the parameters.
MetricKnn provides a set of pre-defined indexes.
Definition: mknn_predefined_index.hpp:24
A Resolver represents the parameters of a similarity search.
Definition: mknn_resolver.hpp:27
void parseString(std::string parameters_string)
Parses a string in the format: parameter1=value1,parameter2=value2
static DistanceParams newEmpty()
Creates an empty object.
static IndexParams newEmpty()
Creates an empty object.
void * getObject(std::string name)
Returns a object reference.
bool getBool(std::string name)
Returns a boolean value.