STK++ 0.9.13
STK::Funct::Seriedl Class Reference

This Serie computes. More...

Inheritance diagram for STK::Funct::Seriedl:
Inheritance graph

Public Member Functions

 Seriedl (Real const &a, Real const &x)
 constructor
 
Real firstImpl () const
 compute the first term of the serie
 
Real nextImpl () const
 compute the next terms
 
- Public Member Functions inherited from STK::ISerie< Seriedl >
Real first () const
 
Real next () const
 
- Public Member Functions inherited from STK::IRecursiveTemplate< Derived >
Derived & asDerived ()
 static cast : return a reference of this with a cast to the derived class.
 
Derived constasDerived () const
 static cast : return a const reference of this with a cast to the derived class.
 
Derived * asPtrDerived ()
 static cast : return a ptr on a Derived of this with a cast to the derived class.
 
Derived constasPtrDerived () const
 static cast : return a ptr on a constant Derived of this with a cast to the derived class.
 
Derived * clone () const
 create a leaf using the copy constructor of the Derived class.
 
Derived * clone (bool isRef) const
 create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not.
 

Private Attributes

Real constx_
 
int n_
 
Real xn_factn_
 
Real aplusn_
 

Additional Inherited Members

- Protected Member Functions inherited from STK::ISerie< Seriedl >
 ISerie ()
 Default Constructor.
 
 ~ISerie ()
 destructor.
 
- Protected Member Functions inherited from STK::IRecursiveTemplate< Derived >
 IRecursiveTemplate ()
 constructor.
 
 ~IRecursiveTemplate ()
 destructor.
 

Detailed Description

This Serie computes.

\[
   \frac{x^n}{(a+n)n!}
\]

and is used in gammaRatio_dl.

Definition at line 77 of file STK_Funct_gammaRatio.cpp.

Constructor & Destructor Documentation

◆ Seriedl()

STK::Funct::Seriedl::Seriedl ( Real const a,
Real const x 
)
inline

Member Function Documentation

◆ firstImpl()

Real STK::Funct::Seriedl::firstImpl ( ) const
inline

compute the first term of the serie

Definition at line 91 of file STK_Funct_gammaRatio.cpp.

91{ return x_/aplusn_;}

References aplusn_, and x_.

◆ nextImpl()

Real STK::Funct::Seriedl::nextImpl ( ) const
inline

compute the next terms

Definition at line 93 of file STK_Funct_gammaRatio.cpp.

94 {
95 // n and x^n/ n!
96 xn_factn_ *= (x_/(++n_));
97 // x^n/((a+n)n!)
98 return xn_factn_/(++aplusn_);
99 }

References aplusn_, n_, x_, and xn_factn_.

Member Data Documentation

◆ aplusn_

Real STK::Funct::Seriedl::aplusn_
mutableprivate

Definition at line 83 of file STK_Funct_gammaRatio.cpp.

Referenced by firstImpl(), and nextImpl().

◆ n_

int STK::Funct::Seriedl::n_
mutableprivate

Definition at line 81 of file STK_Funct_gammaRatio.cpp.

Referenced by nextImpl().

◆ x_

Real const& STK::Funct::Seriedl::x_
private

Definition at line 80 of file STK_Funct_gammaRatio.cpp.

Referenced by firstImpl(), and nextImpl().

◆ xn_factn_

Real STK::Funct::Seriedl::xn_factn_
mutableprivate

Definition at line 82 of file STK_Funct_gammaRatio.cpp.

Referenced by nextImpl().


The documentation for this class was generated from the following file: