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
GsfBetheHeitlerUpdator::Polynomial Class Reference

Public Member Functions

float operator() (float x) const
 Evaluation of the polynomial. More...
 
 Polynomial ()
 Default constructor (needed for construction of a vector) More...
 
 Polynomial (float coefficients[], int is)
 

Private Attributes

int m_size =0
 
float theCoeffs [MaxOrder] ={0}
 

Detailed Description

Helper class for construction & evaluation of a polynomial

Definition at line 34 of file GsfBetheHeitlerUpdator.h.

Constructor & Destructor Documentation

GsfBetheHeitlerUpdator::Polynomial::Polynomial ( )
inline

Default constructor (needed for construction of a vector)

Definition at line 37 of file GsfBetheHeitlerUpdator.h.

37 {}
GsfBetheHeitlerUpdator::Polynomial::Polynomial ( float  coefficients[],
int  is 
)
inline

Constructor from a vector of coefficients (in decreasing order of powers of x)

Definition at line 41 of file GsfBetheHeitlerUpdator.h.

References i, m_size, and theCoeffs.

41  :
42  m_size(is) {
43  for (int i=0; i!=m_size; ++i)
44  theCoeffs[i]=coefficients[i];
45  }
int i
Definition: DBlmapReader.cc:9

Member Function Documentation

float GsfBetheHeitlerUpdator::Polynomial::operator() ( float  x) const
inline

Evaluation of the polynomial.

Definition at line 47 of file GsfBetheHeitlerUpdator.h.

References i, m_size, and theCoeffs.

47  {
48  float sum=theCoeffs[0];
49  for (int i=1; i!=m_size; ++i)
50  sum = x*sum + theCoeffs[i];
51  return sum;
52  }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

int GsfBetheHeitlerUpdator::Polynomial::m_size =0
private

Definition at line 55 of file GsfBetheHeitlerUpdator.h.

Referenced by operator()(), and Polynomial().

float GsfBetheHeitlerUpdator::Polynomial::theCoeffs[MaxOrder] ={0}
private

Definition at line 54 of file GsfBetheHeitlerUpdator.h.

Referenced by operator()(), and Polynomial().