CMS 3D CMS Logo

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 std::shared_ptr< double > *c)
 
 Polynomial (const Parameter *p)
 

Private Attributes

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

Detailed Description

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

Definition at line 7 of file Polynomial.h.

Constructor & Destructor Documentation

◆ Polynomial() [1/3]

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

Definition at line 25 of file Polynomial.h.

25 : c0_(new double(*c)), poly_(c + 1) {}
std::shared_ptr< double > c0_
Definition: Polynomial.h:15
Polynomial< n - 1 > poly_
Definition: Polynomial.h:16

◆ Polynomial() [2/3]

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

Definition at line 20 of file Polynomial.h.

20 : c0_(*c), poly_(c + 1) {}
std::shared_ptr< double > c0_
Definition: Polynomial.h:15
Polynomial< n - 1 > poly_
Definition: Polynomial.h:16

◆ Polynomial() [3/3]

template<unsigned int n>
funct::Polynomial< n >::Polynomial ( const Parameter p)

Definition at line 22 of file Polynomial.h.

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

Member Function Documentation

◆ operator()()

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

Definition at line 28 of file Polynomial.h.

References x.

28  {
29  return *c0_ + x * poly_(x);
30  }
std::shared_ptr< double > c0_
Definition: Polynomial.h:15
Polynomial< n - 1 > poly_
Definition: Polynomial.h:16

Member Data Documentation

◆ c0_

template<unsigned int n>
std::shared_ptr<double> funct::Polynomial< n >::c0_
private

◆ poly_

template<unsigned int n>
Polynomial<n - 1> funct::Polynomial< n >::poly_
private