This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
00001 /* Generated by Together */ 00002 00003 #ifndef IBASICFUNCTION_H 00004 #define IBASICFUNCTION_H 00005 #include "IModelFunction.h" 00006 00007 00008 class IBasicFunction { 00009 public: 00010 00011 virtual string description() = 0; 00012 00013 virtual void setDescription(string description) = 0; 00014 00018 virtual double value(const std::vector<double>& x) const = 0; 00019 00025 virtual const std::vector<double>& grad(const std::vector<double>& x) const = 0; 00026 00030 virtual bool hasGradient() const = 0; 00031 00035 virtual int dimension() const = 0; 00036 00040 virtual void toXML(std_ostream & os) const = 0; 00041 00046 virtual bool isEqual(const IBasicFunction * f) const = 0; 00047 00048 virtual IBasicFunction* clone() = 0; 00049 00050 virtual ~IBasicFunction() {} 00051 00052 // set normalization to the current range. if function is not normalizable then return false. 00053 00054 // set range information (you can still compute values outside of the range). 00055 00056 // sets the range from -inf to +inf in all dimensions. 00057 // this is the default range if not set otherwise. 00058 }; 00059 #endif //IBASICFUNCTION_H