RAIDA  1.9.0
IFunctionROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_IFUNCTIONROOT_H
3 #define AIDA_IFUNCTIONROOT_H 1
4 
5 #include <AIDA/IFunction.h>
6 #include <string>
7 #include <vector>
8 
9 namespace AIDA {
10 
11 class IAnnotation;
12 
26 class IFunctionROOT : virtual public IFunction {
27 
28 public:
30  virtual ~IFunctionROOT() { /* nop */; }
31 
32  IFunctionROOT() { /* nop */; }
33 
39  virtual std::string title() const ;
40 
47  virtual bool setTitle(const std::string & title) ;
48 
52  virtual double value(const std::vector<double> & x) const ;
53 
57  virtual int dimension() const ;
58 
63  virtual bool isEqual(const IFunction & f) const ;
64 
70  virtual const std::vector<double> & gradient(const std::vector<double> & x) const ;
71 
75  virtual bool providesGradient() const ;
76 
80  virtual std::string variableName(int i) const ;
81 
85  virtual std::vector<std::string> variableNames() const ;
86 
90  virtual bool setParameters(const std::vector<double> & params) ;
91 
95  virtual const std::vector<double> & parameters() const ;
96 
100  virtual int numberOfParameters() const ;
101 
109  virtual std::vector<std::string> parameterNames() const ;
110 
118  virtual bool setParameter(const std::string & name, double x) ;
119 
120  virtual double parameter(const std::string & name) const ;
121 
126  virtual int indexOfParameter(const std::string & name) const ;
127 
128  virtual IAnnotation & annotation() ;
129 
130  virtual const IAnnotation & annotation() const ;
131 
171  virtual std::string codeletString() const ;
172 
178  virtual void * cast(const std::string & className) const ;
179 
181  /*# IAnnotation lnkIAnnotation; */
182 }; // class
183 } // namespace AIDA
184 #endif /* ifndef AIDA_IFUNCTIONROOT_H */
Principal user-level function interface.
Definition: IFunction.h:35
virtual std::string variableName(int i) const
Get the symbolic name of i-th variable.
Definition: IFunctionROOT.cc:51
virtual ~IFunctionROOT()
Destructor.
Definition: IFunctionROOT.h:30
virtual const std::vector< double > & parameters() const
Retrieve current vector of parameters.
Definition: IFunctionROOT.cc:70
Definition: IFunctionROOT.h:26
virtual int numberOfParameters() const
Number of parameters.
Definition: IFunctionROOT.cc:76
virtual const std::vector< double > & gradient(const std::vector< double > &x) const
Gradient of the function.
Definition: IFunctionROOT.cc:39
virtual std::vector< std::string > variableNames() const
Get all the names in a vector.
Definition: IFunctionROOT.cc:57
virtual std::vector< std::string > parameterNames() const
Names of paramaters.
Definition: IFunctionROOT.cc:82
virtual bool setParameter(const std::string &name, double x)
Set parameter&#39;s value by name.
Definition: IFunctionROOT.cc:89
virtual bool isEqual(const IFunction &f) const
Compare if functions are the same.
Definition: IFunctionROOT.cc:33
virtual std::string codeletString() const
String describing the metatype and implementation of the function.
Definition: IFunctionROOT.cc:121
virtual void * cast(const std::string &className) const
See IManagedObject for a description.
Definition: IFunctionROOT.cc:127
virtual double value(const std::vector< double > &x) const
Scalar value of the function.
Definition: IFunctionROOT.cc:21
virtual bool setParameters(const std::vector< double > &params)
Set new vector of parameters.
Definition: IFunctionROOT.cc:64
virtual std::string title() const
Get the Function&#39;s title.
Definition: IFunctionROOT.cc:9
virtual int dimension() const
Dimensionality of the domain space.
Definition: IFunctionROOT.cc:27
virtual bool setTitle(const std::string &title)
Set the histogram title.
Definition: IFunctionROOT.cc:15
virtual int indexOfParameter(const std::string &name) const
Return -1 if parameter not found (name undefined).
Definition: IFunctionROOT.cc:101
virtual bool providesGradient() const
Determine whether function is able to compute gradient.
Definition: IFunctionROOT.cc:45