EvenPolynomial.h

Classes

EvenPolynomial -- A one dimensional odd polynomial class (full description)
EvenPolynomial_PS -- Partial specialization of EvenPolynomial for AutoDiff (full description)

template<class T> class EvenPolynomial: public EvenPolynomialParam<T>

Interface

Public Members
EvenPolynomial() : EvenPolynomialParam<T>()
explicit EvenPolynomial(uInt order) : order<T>(order)
EvenPolynomial(const EvenPolynomial<T> &other) : other<T>(other)
template <class W> EvenPolynomial(const EvenPolynomial<W> &other) : EvenPolynomialParam<T>(other)
EvenPolynomial<T> &operator=(const EvenPolynomial<T> &other)
virtual ~EvenPolynomial()
virtual T eval(typename Function1D<T>::FunctionArg x) const
virtual Function<T> *clone() const
virtual Function<typename FunctionTraits<T>::DiffType> *cloneAD() const
virtual Function<typename FunctionTraits<T>::BaseType> *cloneNonAD() const

Description

Prerequisite

Synopsis

An EvenPolynomial contains a set of coefficients; its fundamental operation is evaluating itself at some "x". The number of coefficients is the order of the polynomial divided by two, plus one, so is the number of available parameters.

Example

  EvenPolynomial<Float> pf(3);  // Second order polynomial - coeffs 0 by default
  pf.setCoefficient(0, 1.0);
  pf[1] = 2.0;		// 2x^2 + 1x^0
  pf(2); // == 8

Template Type Argument Requirements (T)

Thrown Exceptions

To Do

Member Description

EvenPolynomial() : EvenPolynomialParam<T>()

Constructs a zeroth order polynomial, with a coeficcient of 0.0.

explicit EvenPolynomial(uInt order) : order<T>(order)

Makes a polynomial of the given order, with all coeficcients set to zero.

EvenPolynomial(const EvenPolynomial<T> &other) : other<T>(other)
template <class W> EvenPolynomial(const EvenPolynomial<W> &other) : EvenPolynomialParam<T>(other)
EvenPolynomial<T> &operator=(const EvenPolynomial<T> &other)

Copy constructor/assignment (deep copy)

virtual ~EvenPolynomial()

Destructor

virtual T eval(typename Function1D<T>::FunctionArg x) const

Evaluate the polynomial at x.

virtual Function<T> *clone() const
virtual Function<typename FunctionTraits<T>::DiffType> *cloneAD() const
virtual Function<typename FunctionTraits<T>::BaseType> *cloneNonAD() const

Return a copy of this object from the heap. The caller is responsible for deleting the pointer.


template <class T> class EvenPolynomial_PS<AutoDiff<T> > : public EvenPolynomialParam<AutoDiff<T> >

Interface

EvenPolynomial_PS() : EvenPolynomialParam<AutoDiff<T> >()
explicit EvenPolynomial_PS(uInt order) : order<EvenPolynomialParam<T> >(order)
EvenPolynomial_PS(const EvenPolynomial_PS<AutoDiff<T> > &other) : other<AutoDiff<T> >(other)
template <class W> EvenPolynomial_PS(const EvenPolynomial_PS<W> &other) : EvenPolynomialParam<other<T> >(other)
EvenPolynomial_PS<AutoDiff<T> > & operator=(const EvenPolynomial_PS<AutoDiff<T> > &other)
virtual ~EvenPolynomial_PS()
virtual AutoDiff<T> eval(typename Function<AutoDiff<T> >::FunctionArg x) const
virtual Function<AutoDiff<T> > *clone() const
virtual Function<typename FunctionTraits<Traits<T> >::DiffType> *cloneAD() const
virtual Function<typename FunctionTraits<Traits<T> >::BaseType> *cloneNonAD() const

Description

Synopsis

Warning The name EvenPolynomial_PS is only for cxx2html documentation problems. Use EvenPolynomial in your code.

Member Description

EvenPolynomial_PS() : EvenPolynomialParam<AutoDiff<T> >()
explicit EvenPolynomial_PS(uInt order) : order<EvenPolynomialParam<T> >(order)

Constructs one dimensional EvenPolynomials.

EvenPolynomial_PS(const EvenPolynomial_PS<AutoDiff<T> > &other) : other<AutoDiff<T> >(other)
template <class W> EvenPolynomial_PS(const EvenPolynomial_PS<W> &other) : EvenPolynomialParam<other<T> >(other)

Copy constructor (deep copy)

EvenPolynomial_PS<AutoDiff<T> > & operator=(const EvenPolynomial_PS<AutoDiff<T> > &other)

Copy assignment (deep copy)

virtual ~EvenPolynomial_PS()

Destructor

virtual AutoDiff<T> eval(typename Function<AutoDiff<T> >::FunctionArg x) const

Evaluate the polynomial and its derivatives at x wrt to the coefficients.

virtual Function<AutoDiff<T> > *clone() const
virtual Function<typename FunctionTraits<Traits<T> >::DiffType> *cloneAD() const
virtual Function<typename FunctionTraits<Traits<T> >::BaseType> *cloneNonAD() const

Return a copy of this object from the heap. The caller is responsible for deleting this pointer.