cheshirekow  v0.1.0
mpblocks::polynomial::Polynomial< Scalar, Degree > Class Template Reference

A dense, statically sized polynomial. More...

#include <mpblocks/polynomial/Polynomial.h>

Inheritance diagram for mpblocks::polynomial::Polynomial< Scalar, Degree >:
mpblocks::polynomial::LValue< Scalar, Polynomial< Scalar, Degree > > mpblocks::polynomial::RValue< Scalar, Polynomial< Scalar, Degree > >

Classes

struct  iterator
 

Public Types

enum  { DEGREE =Degree, FACTORED =0 }
 
typedef LValue< Scalar,
Polynomial_t
LValue_t
 
typedef Polynomial< Scalar,
Degree > 
Polynomial_t
 
typedef unsigned int Size_t
 
- Public Types inherited from mpblocks::polynomial::LValue< Scalar, Polynomial< Scalar, Degree > >
typedef unsigned int Size_t
 
typedef StreamAssignment
< LValue< Scalar, Polynomial
< Scalar, Degree > > > 
Stream_t
 
- Public Types inherited from mpblocks::polynomial::RValue< Scalar, Polynomial< Scalar, Degree > >
typedef unsigned int Size_t
 

Public Member Functions

Scalar eval (Scalar x)
 
Scalar & operator() (const iterator iter)
 
Scalar const & operator() (const iterator iter) const
 
Scalar & operator[] (int i)
 vector accessor More...
 
Scalar const & operator[] (int i) const
 vector accessor More...
 
 Polynomial ()
 Default constructor. More...
 
template<typename Exp >
 Polynomial (const RValue< Scalar, Exp > &exp)
 Construct from any PolynomialExpression: More...
 
 Polynomial (Scalar a0)
 fixed size construction More...
 
 Polynomial (Scalar a0, Scalar a1)
 
 Polynomial (Scalar a0, Scalar a1, Scalar a2)
 
void resize (Size_t size)
 
Size_t size () const
 
- Public Member Functions inherited from mpblocks::polynomial::LValue< Scalar, Polynomial< Scalar, Degree > >
Size_t degree () const
 
void fill (Scalar val)
 
 operator RValue< Scalar, Polynomial< Scalar, Degree > > ()
 
Stream_t operator<< (Scalar x)
 returns a stream for assignment More...
 
LValue< Scalar, Polynomial
< Scalar, Degree > > & 
operator= (RValue< Scalar, Exp2 > const &B)
 
Scalar & operator[] (Size_t i)
 return the evaluated i'th element of a vector expression More...
 
void resize (Size_t size)
 
Size_t size () const
 return the size for a vector More...
 
- Public Member Functions inherited from mpblocks::polynomial::RValue< Scalar, Polynomial< Scalar, Degree > >
Size_t degree () const
 
 operator Polynomial< Scalar, Degree > & ()
 return a reference to the derived type More...
 
 operator Polynomial< Scalar, Degree >const & ()
 return a const reference to the derived type More...
 
Scalar operator[] (Size_t i) const
 return the evaluated i'th element of a vector expression More...
 
Size_t size () const
 return the size for a vector More...
 

Protected Attributes

Scalar m_data [Degree+1]
 

Detailed Description

template<typename Scalar, int Degree>
class mpblocks::polynomial::Polynomial< Scalar, Degree >

A dense, statically sized polynomial.

Definition at line 40 of file Polynomial.h.

Member Typedef Documentation

template<typename Scalar , int Degree>
typedef LValue< Scalar, Polynomial_t > mpblocks::polynomial::Polynomial< Scalar, Degree >::LValue_t

Definition at line 46 of file Polynomial.h.

template<typename Scalar , int Degree>
typedef Polynomial<Scalar,Degree > mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial_t

Definition at line 45 of file Polynomial.h.

template<typename Scalar , int Degree>
typedef unsigned int mpblocks::polynomial::Polynomial< Scalar, Degree >::Size_t

Definition at line 74 of file Polynomial.h.

Member Enumeration Documentation

template<typename Scalar , int Degree>
anonymous enum
Enumerator
DEGREE 
FACTORED 

Definition at line 48 of file Polynomial.h.

Constructor & Destructor Documentation

template<typename Scalar , int Degree>
mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial ( )
inline

Default constructor.

Definition at line 104 of file Polynomial.h.

template<typename Scalar , int Degree>
template<typename Exp >
mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial ( const RValue< Scalar, Exp > &  exp)
inline

Construct from any PolynomialExpression:

Definition at line 112 of file Polynomial.h.

template<typename Scalar , int Degree>
mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial ( Scalar  a0)
inline

fixed size construction

Definition at line 119 of file Polynomial.h.

template<typename Scalar , int Degree>
mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial ( Scalar  a0,
Scalar  a1 
)
inline

Definition at line 125 of file Polynomial.h.

template<typename Scalar , int Degree>
mpblocks::polynomial::Polynomial< Scalar, Degree >::Polynomial ( Scalar  a0,
Scalar  a1,
Scalar  a2 
)
inline

Definition at line 132 of file Polynomial.h.

Member Function Documentation

template<typename Scalar , int Degree>
Scalar mpblocks::polynomial::Polynomial< Scalar, Degree >::eval ( Scalar  x)
inline

Definition at line 140 of file Polynomial.h.

template<typename Scalar , int Degree>
Scalar& mpblocks::polynomial::Polynomial< Scalar, Degree >::operator() ( const iterator  iter)
inline

Definition at line 93 of file Polynomial.h.

template<typename Scalar , int Degree>
Scalar const& mpblocks::polynomial::Polynomial< Scalar, Degree >::operator() ( const iterator  iter) const
inline

Definition at line 98 of file Polynomial.h.

template<typename Scalar , int Degree>
Scalar& mpblocks::polynomial::Polynomial< Scalar, Degree >::operator[] ( int  i)
inline

vector accessor

Definition at line 82 of file Polynomial.h.

template<typename Scalar , int Degree>
Scalar const& mpblocks::polynomial::Polynomial< Scalar, Degree >::operator[] ( int  i) const
inline

vector accessor

Definition at line 88 of file Polynomial.h.

template<typename Scalar , int Degree>
void mpblocks::polynomial::Polynomial< Scalar, Degree >::resize ( Size_t  size)
inline

Definition at line 79 of file Polynomial.h.

template<typename Scalar , int Degree>
Size_t mpblocks::polynomial::Polynomial< Scalar, Degree >::size ( ) const
inline

Definition at line 76 of file Polynomial.h.

Member Data Documentation

template<typename Scalar , int Degree>
Scalar mpblocks::polynomial::Polynomial< Scalar, Degree >::m_data[Degree+1]
protected

Definition at line 71 of file Polynomial.h.


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