library of assembled shared sources |
http://lass.cocamware.com |
#include <polynomial.h>
Public Types | |
typedef Polynomial< T > | TSelf |
typedef NumTraits< T > | TNumTraits |
typedef util::CallTraits< T > ::TValue | TValue |
typedef util::CallTraits< T > ::TParam | TParam |
typedef util::CallTraits< T > ::TReference | TReference |
typedef util::CallTraits< T > ::TConstReference | TConstReference |
typedef std::vector< TValue > | TCoefficients |
typedef TCoefficients::size_type | size_type |
typedef TCoefficients::const_iterator | const_iterator |
Public Member Functions | |
Polynomial () | |
Polynomial (TParam iScalar) | |
Polynomial (const TCoefficients &iCoefficients) | |
template<typename InputIterator > | |
Polynomial (InputIterator iBegin, InputIterator iEnd) | |
const TCoefficients & | coefficients () const |
const TValue | operator[] (size_t iIndex) const |
const TValue | at (size_t iIndex) const |
const TValue | operator() (TParam iX) const |
const Polynomial< T > & | operator+ () const |
const Polynomial< T > | operator- () const |
Polynomial< T > & | operator+= (const Polynomial< T > &iOther) |
Polynomial< T > & | operator-= (const Polynomial< T > &iOther) |
Polynomial< T > & | operator*= (const Polynomial< T > &iOther) |
Polynomial< T > & | operator+= (TParam iScalar) |
Polynomial< T > & | operator-= (TParam iScalar) |
Polynomial< T > & | operator*= (TParam iScalar) |
Polynomial< T > & | operator/= (TParam iScalar) |
Polynomial< T > | derivative () const |
Polynomial< T > | integral () const |
Polynomial< T > | pow (unsigned iPower) const |
const size_type | size () const |
return size of coefficients. | |
const const_iterator | begin () const |
return iterator to first (lowest) coefficient | |
const const_iterator | end () const |
return iterator to last (highest) coefficient | |
Static Public Member Functions | |
static Polynomial< T > | one () |
return constant polynomial 1 | |
static Polynomial< T > | x () |
return linear polynomial x | |
Private Attributes | |
TCoefficients | a_ |
A polynomial is a mathematical expression involving a sum of powers in one or more variables multiplied by coefficients., Eric W. Weisstein. "Polynomial." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Polynomial.html
Definition at line 67 of file polynomial.h.
typedef Polynomial<T> lass::num::Polynomial< T >::TSelf |
Definition at line 71 of file polynomial.h.
typedef NumTraits<T> lass::num::Polynomial< T >::TNumTraits |
Definition at line 72 of file polynomial.h.
typedef util::CallTraits<T>::TValue lass::num::Polynomial< T >::TValue |
Definition at line 73 of file polynomial.h.
typedef util::CallTraits<T>::TParam lass::num::Polynomial< T >::TParam |
Definition at line 74 of file polynomial.h.
typedef util::CallTraits<T>::TReference lass::num::Polynomial< T >::TReference |
Definition at line 75 of file polynomial.h.
typedef util::CallTraits<T>::TConstReference lass::num::Polynomial< T >::TConstReference |
Definition at line 76 of file polynomial.h.
typedef std::vector<TValue> lass::num::Polynomial< T >::TCoefficients |
Definition at line 78 of file polynomial.h.
typedef TCoefficients::size_type lass::num::Polynomial< T >::size_type |
Definition at line 79 of file polynomial.h.
typedef TCoefficients::const_iterator lass::num::Polynomial< T >::const_iterator |
Definition at line 80 of file polynomial.h.
lass::num::Polynomial< T >::Polynomial | ( | ) | [inline] |
Definition at line 57 of file polynomial.inl.
lass::num::Polynomial< T >::Polynomial | ( | TParam | iScalar | ) | [inline, explicit] |
Definition at line 63 of file polynomial.inl.
lass::num::Polynomial< T >::Polynomial | ( | const TCoefficients & | iCoefficients | ) | [inline, explicit] |
Definition at line 71 of file polynomial.inl.
lass::num::Polynomial< T >::Polynomial | ( | InputIterator | iBegin, | |
InputIterator | iEnd | |||
) | [inline] |
Definition at line 79 of file polynomial.inl.
const Polynomial< T >::TCoefficients & lass::num::Polynomial< T >::coefficients | ( | ) | const [inline] |
Definition at line 88 of file polynomial.inl.
References lass::num::Polynomial< T >::a_.
Referenced by lass::num::operator<<(), lass::num::operator==(), and lass::num::Polynomial< T >::x().
const Polynomial< T >::TValue lass::num::Polynomial< T >::operator[] | ( | size_t | iIndex | ) | const [inline] |
Definition at line 97 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and LASS_ASSERT.
const Polynomial< T >::TValue lass::num::Polynomial< T >::at | ( | size_t | iIndex | ) | const [inline] |
Definition at line 107 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and lass::num::NumTraits< C >::zero.
const Polynomial< T >::TValue lass::num::Polynomial< T >::operator() | ( | TParam | iX | ) | const [inline] |
Definition at line 116 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, lass::num::NumTraits< C >::one, lass::num::Polynomial< T >::x(), and lass::num::NumTraits< C >::zero.
const Polynomial< T > & lass::num::Polynomial< T >::operator+ | ( | ) | const [inline] |
Definition at line 132 of file polynomial.inl.
const Polynomial< T > lass::num::Polynomial< T >::operator- | ( | ) | const [inline] |
Polynomial< T > & lass::num::Polynomial< T >::operator+= | ( | const Polynomial< T > & | iOther | ) | [inline] |
Definition at line 154 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and lass::num::NumTraits< C >::zero.
Polynomial< T > & lass::num::Polynomial< T >::operator-= | ( | const Polynomial< T > & | iOther | ) | [inline] |
Definition at line 171 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and lass::num::NumTraits< C >::zero.
Polynomial< T > & lass::num::Polynomial< T >::operator*= | ( | const Polynomial< T > & | iOther | ) | [inline] |
Definition at line 188 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and lass::num::NumTraits< C >::zero.
Polynomial< T > & lass::num::Polynomial< T >::operator+= | ( | TParam | iScalar | ) | [inline] |
Polynomial< T > & lass::num::Polynomial< T >::operator-= | ( | TParam | iScalar | ) | [inline] |
Polynomial< T > & lass::num::Polynomial< T >::operator*= | ( | TParam | iScalar | ) | [inline] |
Polynomial< T > & lass::num::Polynomial< T >::operator/= | ( | TParam | iScalar | ) | [inline] |
Polynomial< T > lass::num::Polynomial< T >::derivative | ( | ) | const [inline] |
Definition at line 266 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, and lass::stde::T.
Referenced by lass::num::PolynomialQuotient< T >::derivative().
Polynomial< T > lass::num::Polynomial< T >::integral | ( | ) | const [inline] |
Definition at line 284 of file polynomial.inl.
References lass::num::Polynomial< T >::a_, lass::stde::T, and lass::num::NumTraits< C >::zero.
Polynomial< T > lass::num::Polynomial< T >::pow | ( | unsigned | iPower | ) | const [inline] |
Definition at line 303 of file polynomial.inl.
Referenced by lass::num::PolynomialQuotient< T >::pow().
const Polynomial< T >::size_type lass::num::Polynomial< T >::size | ( | ) | const [inline] |
return size of coefficients.
Definition at line 318 of file polynomial.inl.
References lass::num::Polynomial< T >::a_.
const Polynomial< T >::const_iterator lass::num::Polynomial< T >::begin | ( | ) | const [inline] |
return iterator to first (lowest) coefficient
Definition at line 328 of file polynomial.inl.
References lass::num::Polynomial< T >::a_.
const Polynomial< T >::const_iterator lass::num::Polynomial< T >::end | ( | ) | const [inline] |
return iterator to last (highest) coefficient
Definition at line 338 of file polynomial.inl.
References lass::num::Polynomial< T >::a_.
Polynomial< T > lass::num::Polynomial< T >::one | ( | ) | [inline, static] |
Polynomial< T > lass::num::Polynomial< T >::x | ( | ) | [inline, static] |
return linear polynomial x
Definition at line 359 of file polynomial.inl.
References lass::num::Polynomial< T >::coefficients().
Referenced by lass::num::Polynomial< T >::operator()().
TCoefficients lass::num::Polynomial< T >::a_ [private] |
Definition at line 118 of file polynomial.h.
Referenced by lass::num::Polynomial< T >::at(), lass::num::Polynomial< T >::begin(), lass::num::Polynomial< T >::coefficients(), lass::num::Polynomial< T >::derivative(), lass::num::Polynomial< T >::end(), lass::num::Polynomial< T >::integral(), lass::num::Polynomial< T >::operator()(), lass::num::Polynomial< T >::operator*=(), lass::num::Polynomial< T >::operator+=(), lass::num::Polynomial< T >::operator-(), lass::num::Polynomial< T >::operator-=(), lass::num::Polynomial< T >::operator/=(), lass::num::Polynomial< T >::operator[](), and lass::num::Polynomial< T >::size().
Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by 1.5.7.1 |