RAIDA
1.9.0
|
Principal user-level function interface. More...
#include <IFunction.h>
Public Member Functions | |
virtual | ~IFunction () |
Destructor. | |
virtual std::string | title () const =0 |
Get the Function's title. More... | |
virtual bool | setTitle (const std::string &title)=0 |
Set the histogram title. More... | |
virtual double | value (const std::vector< double > &x) const =0 |
Scalar value of the function. | |
virtual int | dimension () const =0 |
Dimensionality of the domain space. | |
virtual bool | isEqual (const IFunction &f) const =0 |
Compare if functions are the same. More... | |
virtual const std::vector < double > & | gradient (const std::vector< double > &x) const =0 |
Gradient of the function. More... | |
virtual bool | providesGradient () const =0 |
Determine whether function is able to compute gradient. | |
virtual std::string | variableName (int i) const =0 |
Get the symbolic name of i-th variable. | |
virtual std::vector< std::string > | variableNames () const =0 |
Get all the names in a vector. | |
virtual bool | setParameters (const std::vector< double > ¶ms)=0 |
Set new vector of parameters. | |
virtual const std::vector < double > & | parameters () const =0 |
Retrieve current vector of parameters. | |
virtual int | numberOfParameters () const =0 |
Number of parameters. | |
virtual std::vector< std::string > | parameterNames () const =0 |
Names of paramaters. More... | |
virtual bool | setParameter (const std::string &name, double x)=0 |
Set parameter's value by name. More... | |
virtual double | parameter (const std::string &name) const =0 |
virtual int | indexOfParameter (const std::string &name) const =0 |
Return -1 if parameter not found (name undefined). More... | |
virtual IAnnotation & | annotation ()=0 |
virtual const IAnnotation & | annotation () const =0 |
virtual std::string | codeletString () const =0 |
String describing the metatype and implementation of the function. More... | |
virtual void * | cast (const std::string &className) const =0 |
See IManagedObject for a description. More... | |
Principal user-level function interface.
Function is a self contained object, which remembers the current value of its parameters which are simple doubles. IFunction may be directly plotted or fitted.
The standard convention of referring to variables by name: "x[0]" corresponds to variable number 0 etc.
Function is a self contained object, which remembers the current value of its parameters which are simple doubles. IFunction may be directly plotted or fitted.
The standard convention of referring to variables by name: "x[0]" corresponds to variable number 0 etc.
|
pure virtual |
See IManagedObject for a description.
className | The name of the class to cast on. |
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
String describing the metatype and implementation of the function.
Generic format of the string:
codelet:TYPE:LOCATION
TYPE part contains only a 'typename' string which is a metatype identifier (used in plugins and catalogues)
LOCATION may be: 'file', 'verbatim', or 'catalogue'
Detailed description:
codelet:typename - no location specified (using 'catalogue')
codelet:typename:file:/filename.cpp - a c++ source file codelet:typename:file:/filename.py - a python source file codelet:typename:file:/filename.so - a shared library
codelet:typename:catalogue - entry in a catalogue repository
codelet:typename:verbatim:cpp
- c++ source file included verbatim after
codelet:typename:verbatim:py
- python source file included verbatim aftern
Comments:
file:/filename is a relative path to $AIDA_FUNCTION_DEFAULT_DIR file://filename is an absolute path
Examples:
codelet:G:catalogue codelet:userSinus:verbatim:cpp
{ return sin(x); }
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Gradient of the function.
The result is valid only if providesGradient()==true. Otherwise the result is some default (empty) vector.
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Return -1 if parameter not found (name undefined).
Leave it because there are use cases - some users prefer to use numbers.
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Compare if functions are the same.
PENDING: define exactly what it means ;)
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Names of paramaters.
Names should be unique. Case-insensitive for comparison. Case-sensitive for storage and output. All or several names may be left blank "" if the implementation does not want to provide them.
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Set parameter's value by name.
name | The name of the parameter. |
x | The new value of the parameter. |
Implemented in AIDA::IFunctionROOT.
|
pure virtual |
Set the histogram title.
title | The title. |
Implemented in AIDA::IFunctionROOT.
|
pure virtual |