CMS 3D CMS Logo

Public Member Functions | Private Attributes

funct::Polynomial< n > Class Template Reference

#include <Polynomial.h>

List of all members.

Public Member Functions

double operator() (double x) const
 Polynomial (const boost::shared_ptr< double > *c)
 Polynomial (const Parameter *p)
 Polynomial (const double *c)

Private Attributes

boost::shared_ptr< double > c0_
Polynomial< n-1 > poly_

Detailed Description

template<unsigned int n>
class funct::Polynomial< n >

Definition at line 8 of file Polynomial.h.


Constructor & Destructor Documentation

template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const double *  c)

Definition at line 30 of file Polynomial.h.

                                            : 
    c0_(new double(*c)), poly_(c + 1) {
  }
template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const boost::shared_ptr< double > *  c)

Definition at line 20 of file Polynomial.h.

                                                             : 
    c0_(c), poly_(c + 1) {
  }
template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const Parameter p)

Definition at line 24 of file Polynomial.h.

                                               : 
    c0_(c->ptr()), poly_(c + 1) {
  }

Member Function Documentation

template<unsigned int n>
double funct::Polynomial< n >::operator() ( double  x) const

Definition at line 35 of file Polynomial.h.

                                                 {
    return *c0_ + x*poly_(x);
  }

Member Data Documentation

template<unsigned int n>
boost::shared_ptr<double> funct::Polynomial< n >::c0_ [private]
template<unsigned int n>
Polynomial<n-1> funct::Polynomial< n >::poly_ [private]