1#ifndef __JFIT__JLEGENDREESTIMATOR__
2#define __JFIT__JLEGENDREESTIMATOR__
16namespace JPP {
using namespace JFIT; }
25 template<
class JOrdinate_t,
size_t N>
50 if (
distance(__begin, __end) >= NUMBER_OF_PARAMETERS) {
55 V.resize(NUMBER_OF_PARAMETERS);
60 this->xmin = i->getX(); advance(i,
distance(__begin, __end) - 1);
61 this->xmax = i->getX();
63 for (i = __begin; i != __end; ++i) {
65 const double z = this->getX(i->getX());
67 for (
size_t n = 0; n <= N; ++n) {
68 h[n] = legendre(n, z);
74 Y[
row] += h[
row] * i->getY();
100 throw JValueOutOfRange(
"JEstimator<JLegendre>::JEstimator(): Not enough data points.");
105 static const int NUMBER_OF_PARAMETERS = N + 1;
Definition of zero value for any class.
JEstimator(T __begin, T __end)
Constructor.
JMATH::JMatrixNS V
co-variance matrix of fit parameters
JOrdinate_t ordinate_type
Template definition of linear fit.
Exception for accessing a value in a collection that is outside of its range.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary classes and methods for linear and iterative data regression.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template definition for function evaluation of Legendre polynome.