Commit 75cd8d03 authored by Laurent Belcour's avatar Laurent Belcour

Adding non-linear function type, need a Lvenberg-Marquardt fitter and some non-linear functions

parent ec7b405b
......@@ -49,6 +49,22 @@ class function
// definition.
int _nX, _nY ;
vec _min, _max ;
} ;
class nonlinear_function: public function
public: // methods
// Set the vector of parameters for the function
virtual vec parameters() const = 0;
virtual void setParameters(const vec& p) = 0;
// Obtain the derivatives of the function with respect
// to the parameters. The x input of this function is
// the position in the input space and has size dimX(),
// the resulting vector has the size of the parameters:
// [df/dp1, ..., df/dpn]
virtual vec parameters_derivatives(const vec& x) const = 0;
Q_DECLARE_INTERFACE(function, "Fitter.Function")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment