13 #include "msdevstudio/MSconfig.h"
23 #ifdef ITERATOR_MEMBER_DEFECT
31 Quadratic2::Quadratic2 ( )
36 Quadratic2::Quadratic2 (
double yscale,
double y0,
double x0 )
45 void Quadratic2::initialize ()
47 m_name =
"yscale*(x - x0)**2 + y0";
49 m_parm_names.push_back (
"yscale" );
50 m_parm_names.push_back (
"y0" );
51 m_parm_names.push_back (
"x0" );
61 double Quadratic2::operator () (
double x )
const
63 return m_parms[0] * ( x - m_parms[2] ) * ( x - m_parms[2] ) + m_parms[1];
79 m_parms[2] = std::sqrt(std::fabs(min_x*max_x));
82 double Quadratic2::derivByParm (
int i,
double x )
const
86 return (x - m_parms[2]) * (x - m_parms[2]);
94 return -2.*m_parms[0]*(x - m_parms[2]);
FunctionHelper class interface.
Quadratic2 class interface.
This function represents a quadratic, i.e., .
virtual double minValue() const =0
Returns the smallest value in the data set.
virtual double minCoord() const =0
Returns the smallest coordinate value along the X axis in the data set.
numeric::array clone(numeric::array arr)
A function that can be added to a DataRep and used in a fitter.
An abstract base class to help FunctionBase objects perform some operations.
virtual double maxCoord() const =0
Returns the largest coordinate value along the X axis in the data set.