FiReS  0.2.0
FiReS - Filter, Retrieval and Search
fires::SearchConfig Class Reference

Container of the properties for query. More...

#include <SearchConfig.h>

+ Inheritance diagram for fires::SearchConfig:
+ Collaboration diagram for fires::SearchConfig:

Public Types

enum  TDistanceToQuerySet { DISTANCE_TO_AVERAGE_QUERY_OBJECT, MINIMUM_DISTANCE_TO_QUERY_OBJECTS }
 Type of distance used when multiple objects on the query set. More...
 

Public Member Functions

 SearchConfig (TDistanceToQuerySet distanceToQueryType_=DISTANCE_TO_AVERAGE_QUERY_OBJECT)
 
void add (const std::string &label, Comparer *comparer=nullptr, Averager *averager=nullptr, Normalizer *normalizer=nullptr, float weight=1.0f)
 Adds a new property to the container. More...
 
Comparercomparer (const std::string &label)
 
Averageraverager (const std::string &label)
 
Normalizernormalizer (const std::string &label)
 
TDistanceToQuerySetdistanceToQueryType (void)
 
std::map< std::string, QueryPropertyData > & properties (void)
 
ObjectsqueryObjects (void)
 
std::string & resultsPropertyLabel (void)
 
void clearQueryObjects (void)
 
void clearProperties (void)
 
void clear (void)
 

Protected Attributes

std::map< std::string, QueryPropertyData_propertiesConfig
 Configuration for each property.
 
Objects _queryObjects
 Query objects.
 
TDistanceToQuerySet _distanceToQueryType
 
std::string _resultsPropertyLabel
 

Detailed Description

Container of the properties for query.

It holds a map for the properties. The key of the map is a string which represents the name of the property

Definition at line 116 of file SearchConfig.h.

Member Enumeration Documentation

Type of distance used when multiple objects on the query set.

Enumerator
DISTANCE_TO_AVERAGE_QUERY_OBJECT 

Distance is computed agains the average query object.

MINIMUM_DISTANCE_TO_QUERY_OBJECTS 

Distance is computed using the minimum distance to all objects in the query set.

Definition at line 123 of file SearchConfig.h.

Member Function Documentation

void fires::SearchConfig::add ( const std::string &  label,
Comparer comparer = nullptr,
Averager averager = nullptr,
Normalizer normalizer = nullptr,
float  weight = 1.0f 
)

Adds a new property to the container.

Parameters
labelis the name of the property and the key to be used afterwards
comparerpointer to comparer to ve used
averagerpointer to averager to ve used
normalizerpointer to the normalizer to ve used
weightweight of this property
comparerpointer to the comparer object to be used with this property

The documentation for this class was generated from the following file: