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

Interface for a scalar function type. More...

#include <scalarFunctionInterface.hpp>

Public Member Functions

virtual ~ScalarFunctionInterface ()
 Destructor. More...
 
virtual std::vector< std::string > getVariables () const =0
 Get the list of variables the function is parameterized with. More...
 
virtual unsigned int getNofArguments () const =0
 Get the number of arguments of this function. More...
 
virtual void setDefaultVariableValue (const std::string &name, double value)=0
 Set a variable value default. More...
 
virtual
ScalarFunctionInstanceInterface
createInstance () const =0
 Creates an instance of the function. More...
 
virtual std::string tostring () const =0
 Return the representation (VM code or whatever it is) of the function as string. More...
 

Detailed Description

Interface for a scalar function type.

Note
A scalar function is an N-ary function with a fixed number of arguments to a single value (http://mathworld.wolfram.com/ScalarFunction.html). For strus we reduce the value domain to double precision floating point values.

Constructor & Destructor Documentation

virtual strus::ScalarFunctionInterface::~ScalarFunctionInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual ScalarFunctionInstanceInterface* strus::ScalarFunctionInterface::createInstance ( ) const
pure virtual

Creates an instance of the function.

Returns
the created scalar function instance
virtual unsigned int strus::ScalarFunctionInterface::getNofArguments ( ) const
pure virtual

Get the number of arguments of this function.

Returns
the number of arguments
virtual std::vector<std::string> strus::ScalarFunctionInterface::getVariables ( ) const
pure virtual

Get the list of variables the function is parameterized with.

Returns
list of variable names
virtual void strus::ScalarFunctionInterface::setDefaultVariableValue ( const std::string &  name,
double  value 
)
pure virtual

Set a variable value default.

Parameters
[in]namevariable name
[in]valuedefault value of the variable to set
Remarks
Reports an error, if the domain does not match
virtual std::string strus::ScalarFunctionInterface::tostring ( ) const
pure virtual

Return the representation (VM code or whatever it is) of the function as string.


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