STK::ISerie< Serie > Class Template Reference
[The Sub-project STatistiK::Analysis]

Interface base class for Series. More...

#include <STK_ISerie.h>

List of all members.

Public Member Functions

virtual ~ISerie ()
Serie & asLeaf ()
const Serie & asLeaf () const
Real first () const
Real next () const

Protected Member Functions

 ISerie ()


Detailed Description

template<class Serie>
class STK::ISerie< Serie >

The ISerie class is the templated base class for all Series.

ISerie takes a Serie template parameter. This parameter is the type of the class which derives from it. For exemple class Serie : public ISerie<Serie> {...}

The pseudo virtual function defined in this interface have the following definition:

    // return the first coefficient
    inline Real first() const;
    // return the next coefficient: first() have to be called before
    //  any use of next()
    inline Real next() const;

Definition at line 74 of file STK_ISerie.h.


Constructor & Destructor Documentation

template<class Serie>
STK::ISerie< Serie >::ISerie (  )  [inline, protected]

Default Ctor

Definition at line 80 of file STK_ISerie.h.

00080 { ;}

template<class Serie>
virtual STK::ISerie< Serie >::~ISerie (  )  [inline, virtual]

Virtual Dtor.

Definition at line 86 of file STK_ISerie.h.

00086 { ;}


Member Function Documentation

template<class Serie>
Serie& STK::ISerie< Serie >::asLeaf (  )  [inline]

static cast : return a reference of this with a cast to the derived class. This allow to delegate public methods to derived classes.

Definition at line 93 of file STK_ISerie.h.

Referenced by STK::ISerie< Serielog1p >::first(), and STK::ISerie< Serielog1p >::next().

00094     { return static_cast<Serie&>(*this); }

template<class Serie>
const Serie& STK::ISerie< Serie >::asLeaf (  )  const [inline]

static cast : return a const reference of this with a cast to the derived class. This allow to delegate public method to derived classes.

Definition at line 100 of file STK_ISerie.h.

00101     { return static_cast<Serie const &>(*this); }

template<class Serie>
Real STK::ISerie< Serie >::first (  )  const [inline]

return the first coefficient

Definition at line 105 of file STK_ISerie.h.

Referenced by STK::continuedFraction(), STK::sumAlternateSerie(), and STK::sumSerie().

00106     { return asLeaf().first();}

template<class Serie>
Real STK::ISerie< Serie >::next (  )  const [inline]

return the next coefficient: first() have to be called before any use of next()

Definition at line 111 of file STK_ISerie.h.

Referenced by STK::continuedFraction(), STK::sumAlternateSerie(), and STK::sumSerie().

00112     { return asLeaf().next();}


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

Generated on Fri Sep 25 10:31:00 2009 for STK++ by  doxygen 1.5.8