3 template<
typename Number>
7 typedef map<Number, Number> Points;
15 virtual void fit(Points * points);
16 const Number getExponent()
const;
17 const Number getCoefficient()
const;
31 template<
typename Number>
33 :
LinearFit<Number>(),_data(0),_exponent(0),_coeff(0)
36 template<
typename Number>
38 :
LinearFit<Number>(),_data(points),_exponent(0),_coeff(0)
42 template<
typename Number>
44 :
LinearFit<Number>(fit), _data(fit._data),_exponent(fit._exponent),_coeff(fit._coeff)
47 template<
typename Number>
51 template<
typename Number>
61 template<
typename Number>
64 typename Points::const_iterator i;
67 for (i=_data->begin();i!=_data->end();i++)
73 this->_points = &_logData;
75 _coeff = exp(this->_b);
79 template<
typename Number>
86 template<
typename Number>
92 template<
typename Number>
Points * _data
Points provided on input.
Points _logData
Transient (for internal use) array used to hold the log 0f _data.
Number _coeff
Multiplicative Coefficient of the power law.
Number _exponent
Exponent of the power law.