CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
funct::Polynomial< n > Class Template Reference

#include <Polynomial.h>

Public Member Functions

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

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.

30  :
31  c0_(new double(*c)), poly_(c + 1) {
32  }
Polynomial< n-1 > poly_
Definition: Polynomial.h:16
boost::shared_ptr< double > c0_
Definition: Polynomial.h:15
template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const boost::shared_ptr< double > *  c)

Definition at line 20 of file Polynomial.h.

20  :
21  c0_(c), poly_(c + 1) {
22  }
Polynomial< n-1 > poly_
Definition: Polynomial.h:16
boost::shared_ptr< double > c0_
Definition: Polynomial.h:15
template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const Parameter p)

Definition at line 24 of file Polynomial.h.

24  :
25  c0_(c->ptr()), poly_(c + 1) {
26  }
Polynomial< n-1 > poly_
Definition: Polynomial.h:16
boost::shared_ptr< double > c0_
Definition: Polynomial.h:15

Member Function Documentation

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

Definition at line 35 of file Polynomial.h.

35  {
36  return *c0_ + x*poly_(x);
37  }
Polynomial< n-1 > poly_
Definition: Polynomial.h:16
boost::shared_ptr< double > c0_
Definition: Polynomial.h:15

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