13 #include "msdevstudio/MSconfig.h"
22 #ifdef ITERATOR_MEMBER_DEFECT
35 Linear::Linear (
double intercept,
double slope )
39 m_parms[0] = intercept;
43 void Linear::initialize ()
46 m_parm_names.push_back (
"Intercept" );
47 m_parm_names.push_back (
"Slope" );
54 return new Linear ( *
this );
57 double Linear::operator () (
double x )
const
59 return x * m_parms[1] + m_parms[0];
73 m_parms[1] = ( max_y - min_y ) / ( max_x - min_x );
74 m_parms[0] = max_y - m_parms[1] * max_x;
77 double Linear::derivByParm (
int i,
double x )
const
FunctionHelper class interface.
virtual double minValue() const =0
Returns the smallest value in the data set.
Linear function class interface.
virtual double minCoord() const =0
Returns the smallest coordinate value along the X axis in the data set.
numeric::array clone(numeric::array arr)
virtual double maxValue() const =0
Returns the largest value in the data set.
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.
A function can be used with a fitter.