13 #include "msdevstudio/MSconfig.h"
26 #ifdef ITERATOR_MEMBER_DEFECT
37 LogParabola::LogParabola ( )
42 LogParabola::LogParabola (
double n,
double a,
double b)
51 void LogParabola::initialize ()
53 m_name =
"LogParabola";
55 m_parm_names.push_back (
"norm" );
56 m_parm_names.push_back (
"alpha" );
57 m_parm_names.push_back (
"beta" );
67 double LogParabola::operator () (
double x )
const
70 return m_parms[0]*pow(x,(-(m_parms[1] + m_parms[2]*logx)));
81 m_parms[NORM] = total * ( max_x - min_x ) / size;
86 double LogParabola::derivByParm (
int ipar,
double x)
const
89 double dfdnorm = pow(x,( -(m_parms[1] + m_parms[2]*logx)));
98 deriv = -m_parms[0]*logx*dfdnorm;
101 deriv = -m_parms[0]*logx*logx*dfdnorm;
104 std::cout<<
"parameter index not found : "<<ipar<<std::endl;
105 std::cout<<
"I know about "<<NORM<<
" "<<ALPHA<<
" "<<BETA<<
" "<<std::endl;
113 LogParabola::hasDerivatives ()
const
LogParabola class interface.
FunctionHelper class interface.
virtual double minCoord() const =0
Returns the smallest coordinate value along the X axis in the data set.
A function that can be used with a fitter.
numeric::array clone(numeric::array arr)
intp size(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.
virtual double getTotal() const =0
Returns the sum of the values of the data set.
virtual int size() const =0
Returns the number of points in the data set.