RAIDA  1.9.0
IFunction.h
1 // -*- C++ -*-
2 // AID-GENERATED
3 // =========================================================================
4 // This class was generated by AID - Abstract Interface Definition
5 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6 // =========================================================================
7 #ifndef AIDA_IFUNCTION_H
8 #define AIDA_IFUNCTION_H 1
9 
10 // This file is part of the AIDA library
11 // Copyright (C) 2002 by the AIDA team. All rights reserved.
12 // This library is free software and under the terms of the
13 // GNU Library General Public License described in the LGPL.txt
14 
15 #include <string>
16 #include <vector>
17 
18 namespace AIDA {
19 
20 class IAnnotation;
21 
35 class IFunction {
36 
37 public:
39  virtual ~IFunction() { /* nop */; }
40 
46  virtual std::string title() const = 0;
47 
54  virtual bool setTitle(const std::string & title) = 0;
55 
59  virtual double value(const std::vector<double> & x) const = 0;
60 
64  virtual int dimension() const = 0;
65 
70  virtual bool isEqual(const IFunction & f) const = 0;
71 
77  virtual const std::vector<double> & gradient(const std::vector<double> & x) const = 0;
78 
82  virtual bool providesGradient() const = 0;
83 
87  virtual std::string variableName(int i) const = 0;
88 
92  virtual std::vector<std::string> variableNames() const = 0;
93 
97  virtual bool setParameters(const std::vector<double> & params) = 0;
98 
102  virtual const std::vector<double> & parameters() const = 0;
103 
107  virtual int numberOfParameters() const = 0;
108 
116  virtual std::vector<std::string> parameterNames() const = 0;
117 
125  virtual bool setParameter(const std::string & name, double x) = 0;
126 
127  virtual double parameter(const std::string & name) const = 0;
128 
133  virtual int indexOfParameter(const std::string & name) const = 0;
134 
135  virtual IAnnotation & annotation() = 0;
136 
137  virtual const IAnnotation & annotation() const = 0;
138 
178  virtual std::string codeletString() const = 0;
179 
185  virtual void * cast(const std::string & className) const = 0;
186 
188  /*# IAnnotation lnkIAnnotation; */
189 }; // class
190 } // namespace AIDA
191 #endif /* ifndef AIDA_IFUNCTION_H */
Principal user-level function interface.
Definition: IFunction.h:35
virtual std::string variableName(int i) const =0
Get the symbolic name of i-th variable.
virtual const std::vector< double > & gradient(const std::vector< double > &x) const =0
Gradient of the function.
virtual void * cast(const std::string &className) const =0
See IManagedObject for a description.
virtual std::string codeletString() const =0
String describing the metatype and implementation of the function.
virtual bool providesGradient() const =0
Determine whether function is able to compute gradient.
virtual int indexOfParameter(const std::string &name) const =0
Return -1 if parameter not found (name undefined).
virtual std::vector< std::string > variableNames() const =0
Get all the names in a vector.
virtual int dimension() const =0
Dimensionality of the domain space.
virtual const std::vector< double > & parameters() const =0
Retrieve current vector of parameters.
virtual bool isEqual(const IFunction &f) const =0
Compare if functions are the same.
virtual ~IFunction()
Destructor.
Definition: IFunction.h:39
virtual bool setParameter(const std::string &name, double x)=0
Set parameter&#39;s value by name.
virtual std::string title() const =0
Get the Function&#39;s title.
virtual int numberOfParameters() const =0
Number of parameters.
virtual bool setTitle(const std::string &title)=0
Set the histogram title.
virtual double value(const std::vector< double > &x) const =0
Scalar value of the function.
virtual std::vector< std::string > parameterNames() const =0
Names of paramaters.
virtual bool setParameters(const std::vector< double > &params)=0
Set new vector of parameters.
The annotation holds arbitrary information represented with (key,value) pairs of strings.
Definition: IAnnotation.h:28