strus  0.17
Public Member Functions | List of all members
strus::WeightingFunctionInstanceInterface Class Referenceabstract

Interface for a parameterized weighting function instance. More...

#include <weightingFunctionInstanceInterface.hpp>

Public Member Functions

virtual ~WeightingFunctionInstanceInterface ()
 Destructor. More...
 
virtual void addStringParameter (const std::string &name, const std::string &value)=0
 Add a named string value parameter. More...
 
virtual void addNumericParameter (const std::string &name, const NumericVariant &value)=0
 Add a named numeric value parameter. More...
 
virtual
WeightingFunctionContextInterface
createFunctionContext (const StorageClientInterface *storage_, MetaDataReaderInterface *metadata_, const GlobalStatistics &stats) const =0
 Create an execution context for this weighting function instance. More...
 
virtual std::vector< std::string > getVariables () const =0
 Get the list of variables used by this function defined in the query with 'QueryInterface::setWeightingVariableValue( const std::string&, double)'. More...
 
virtual std::string tostring () const =0
 Get a comma ',' separated list of the function parameters as assignments (e.g. name=value) More...
 

Detailed Description

Interface for a parameterized weighting function instance.

Constructor & Destructor Documentation

virtual strus::WeightingFunctionInstanceInterface::~WeightingFunctionInstanceInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::WeightingFunctionInstanceInterface::addNumericParameter ( const std::string &  name,
const NumericVariant &  value 
)
pure virtual

Add a named numeric value parameter.

Parameters
[in]nameparameter name
[in]valueparameter value
virtual void strus::WeightingFunctionInstanceInterface::addStringParameter ( const std::string &  name,
const std::string &  value 
)
pure virtual

Add a named string value parameter.

Parameters
[in]nameparameter name
[in]valueparameter value
virtual WeightingFunctionContextInterface* strus::WeightingFunctionInstanceInterface::createFunctionContext ( const StorageClientInterface storage_,
MetaDataReaderInterface metadata_,
const GlobalStatistics stats 
) const
pure virtual

Create an execution context for this weighting function instance.

Parameters
[in]storage_storage reference for retrieving some statistics (like the document collection frequency)
[in]metadata_meta data interface
[in]statsglobal statistics for weighting
Returns
the execution context to fetch the calculated document weights from (ownership to caller)
virtual std::vector<std::string> strus::WeightingFunctionInstanceInterface::getVariables ( ) const
pure virtual

Get the list of variables used by this function defined in the query with 'QueryInterface::setWeightingVariableValue( const std::string&, double)'.

Returns
the list of variables
virtual std::string strus::WeightingFunctionInstanceInterface::tostring ( ) const
pure virtual

Get a comma ',' separated list of the function parameters as assignments (e.g. name=value)

Returns
the parameter list as string

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