CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AIDA::IFunction Interface Reference

#include <IFunction.h>

Inheritance diagram for AIDA::IFunction::

AIDA::IModelFunction List of all members.

Public Methods

virtual ~IFunction ()
 Destructor. More...

virtual double value (const std::vector< double > &x) const=0
virtual int dimension () const=0
virtual bool isEqual (const IFunction *f) const=0
virtual const std::vector<
double>& 
gradient (const std::vector< double > &x) const=0
virtual bool providesGradient () const=0
virtual std::string variableName (int i) const=0
virtual const std::vector<
std::string>& 
variableNames () const=0
virtual void setParameters (const std::vector< double > &params)=0
virtual const std::vector<
double>& 
parameters () const=0
virtual int numberOfParameters () const=0
virtual const std::vector<
std::string>& 
parameterNames () const=0
virtual bool setParameter (std::string name, double x)=0
virtual double parameter (std::string name) const=0
virtual int indexOfParameter (std::string name) const=0
virtual IAnnotationannotation ()=0
virtual const IAnnotationannotation () const=0
virtual std::string codeletString () const=0

Detailed Description

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.

Author:
The AIDA team (http://aida.freehep.org/)

Definition at line 35 of file IFunction.h.


Constructor & Destructor Documentation

AIDA::IFunction::~IFunction ( ) [inline, virtual]
 

Definition at line 39 of file IFunction.h.


Member Function Documentation

const IAnnotation & AIDA::IFunction::annotation ( ) const [pure virtual]
 

IAnnotation & AIDA::IFunction::annotation ( ) [pure virtual]
 

std::string AIDA::IFunction::codeletString ( ) const [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); }

int AIDA::IFunction::dimension ( ) const [pure virtual]
 

Dimensionality of the domain space.

const std::vector< double > & AIDA::IFunction::gradient ( const std::vector< double > & x ) const [pure virtual]
 

Gradient of the function. The result is valid only if providesGradient()==true. Otherwise the result is some default (empty) vector.

int AIDA::IFunction::indexOfParameter ( std::string name ) const [pure virtual]
 

Return -1 if parameter not found (name undefined). Leave it because there are use cases - some users prefer to use numbers.

bool AIDA::IFunction::isEqual ( const IFunction * f ) const [pure virtual]
 

Compare if functions are the same. PENDING: define exactly what it means ;)

int AIDA::IFunction::numberOfParameters ( ) const [pure virtual]
 

Number of parameters.

double AIDA::IFunction::parameter ( std::string name ) const [pure virtual]
 

const std::vector< std::string > & AIDA::IFunction::parameterNames ( ) const [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.

const std::vector< double > & AIDA::IFunction::parameters ( ) const [pure virtual]
 

Retrieve current vector of parameters.

bool AIDA::IFunction::providesGradient ( ) const [pure virtual]
 

Determine whether function is able to compute gradient.

bool AIDA::IFunction::setParameter ( std::string name,
double x ) [pure virtual]
 

Set parameter's value by name.

Parameters:
name   The name of the parameter.
x   The new value of the parameter.
Returns:
false If name does not correspond to a parameter.

void AIDA::IFunction::setParameters ( const std::vector< double > & params ) [pure virtual]
 

Set new vector of parameters.

double AIDA::IFunction::value ( const std::vector< double > & x ) const [pure virtual]
 

Scalar value of the function.

std::string AIDA::IFunction::variableName ( int i ) const [pure virtual]
 

Get the symbolic name of i-th variable.

const std::vector< std::string > & AIDA::IFunction::variableNames ( ) const [pure virtual]
 

Get all the names in a vector.


The documentation for this interface was generated from the following file:
Generated at Tue Feb 18 15:48:24 2003 for AIDA_Interfaces by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001