1 #ifndef __JTOOLS__JPOLFIT__ 
    2 #define __JTOOLS__JPOLFIT__ 
   25 namespace JPP { 
using namespace JTOOLS; }
 
   38   template<
unsigned int N,      
 
   41            template<
class, 
class> 
class JCollection_t,
 
   45     public JCollection_t<JElement_t, JDistance_t>,
 
   46     public JFunction<typename JElement_t::abscissa_type,
 
   47                      typename JResultType<typename JElement_t::ordinate_type>::result_type>
 
   60     typedef typename collection_type::iterator                                   
iterator;
 
   91       if (this->size() <= 1
u) {
 
   99       if ((p == this->begin() && this->
getDistance(
x, (p++)->getX()) > distance_type::precision) ||
 
  100           (p == this->end()   && this->
getDistance((--p)->getX(), 
x) > distance_type::precision)) {
 
  104                                                                  << 
STREAM(
"?") << this->begin() ->getX() << 
' ' 
  105                                                                  << 
STREAM(
"?") << this->rbegin()->getX()));
 
  111       int n = std::min((
int) (
N + 1), (
int) this->size());               
 
  113       for (
int i = 
n/2; 
i != 0 && p != this->end();   --
i, ++p) {}       
 
  114       for (
int i = 
n  ; 
i != 0 && p != this->begin(); --
i, --p) {}
 
  143   template<
unsigned int N,
 
  146            template<
class, 
class> 
class JCollection_t,
 
  147            class JResult_t   = 
typename JElement_t::ordinate_type,
 
  150     public JPolfitFunction<N, M, JElement_t, JCollection_t, JResult_t, JDistance_t>,
 
  151     public JFunction1D<typename JElement_t::abscissa_type, JResult_t> 
 
  164     typedef typename collection_type::iterator                                   
iterator;
 
Auxiliary methods for mathematics. 
 
Exception for a functional operation. 
 
Definition of zero value for any class. 
 
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects. 
 
Auxiliary data structure for handling std::ostream. 
 
#define MAKE_EXCEPTION(JException_t, A)
Make exception. 
 
Exception for numerical precision error. 
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
 
#define STATIC_CHECK(expr)
 
Exception for accessing a value in a collection that is outside of its range. 
 
Double_t g1(const Double_t x)
Function.