1 #ifndef __JFIT__JLEGENDREESTIMATOR__ 
    2 #define __JFIT__JLEGENDREESTIMATOR__ 
   16 namespace 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);
 
   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) {
 
   71           for (
size_t row = 0; row <= 
N; ++row) {
 
   73             V(row, row) += h[row] * h[row];
 
   74             Y[row]      += h[row] * i->getY();
 
   76             for (
size_t col = 0; col != row; ++col) {
 
   77               V(row, col) += h[row] * h[col];
 
   82         for (
size_t row = 0; row <= 
N; ++row) {
 
   83           for (
size_t col = 0; col != row; ++col) {
 
   84             V(col, row) = V(row, col);
 
   90         for (
size_t row = 0; row <= 
N; ++row) {
 
   94           for (
size_t col = 0; col <= 
N; ++col) {
 
   95             (*this)[row] += V(row, col) * Y[col];
 
  100         throw JValueOutOfRange(
"JEstimator<JLegendre>::JEstimator(): Not enough data points.");
 
  105     static const int NUMBER_OF_PARAMETERS  =  
N + 1;  
 
double getZero< double >()
Get zero value for double. 
 
JEstimator(T __begin, T __end)
Constructor. 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
static const JZero zero
Function object to assign zero value. 
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
Template definition of linear fit. 
 
Definition of zero value for any class. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
Template definition for function evaluation of Legendre polynome. 
 
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter. 
 
double legendre(const unsigned int n, const double x)
Legendre polynome. 
 
alias put_queue eval echo n
 
JOrdinate_t ordinate_type
 
Exception for accessing a value in a collection that is outside of its range. 
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
JMATH::JMatrixNS V
co-variance matrix of fit parameters