A one dimensional polynomial class. More...
#include <Polynomial.h>
  
 Public Member Functions | |
| Polynomial () | |
| Constructs a zero'th order polynomial, with a coeficcient of 0.0.   | |
| Polynomial (uInt order) | |
| Makes a polynomial of the given order, with all coeficcients set to zero.   | |
| Polynomial (const Polynomial< T > &other) | |
| Copy constructor/assignment (deep copy).   | |
| template<class W > | |
| Polynomial (const Polynomial< W > &other) | |
| Polynomial< T > & | operator= (const Polynomial< T > &other) | 
| virtual | ~Polynomial () | 
| Destructor.   | |
| virtual T | eval (typename Function1D< T >::FunctionArg x) const | 
Evaluate the polynomial at x.   | |
| Polynomial< T > | derivative () const | 
| Return the polynomial which is the derivative of this one.   | |
| virtual Function< T > * | clone () const | 
| Return a copy of this object from the heap.   | |
| virtual Function< typename  FunctionTraits< T >::DiffType > *  | cloneAD () const | 
| virtual Function< typename  FunctionTraits< T >::BaseType > *  | cloneNonAD () const | 
A one dimensional polynomial class.
A Polynomial<T> contains a set of coefficients; its fundamental operations is evaluating itself at some "x". The number of coefficients is the order of the polynomial plus one, so is the number of available parameters.
Tip: The present implementation merely stores the coefficients in a Block; In the unlikely case that we need to deal with polynomials with many zero coefficients, a more efficient representation would be possible; 
Polynomial<Float> pf(3); // Third order polynomial - coeffs 0 by default pf.setCoefficient(1, 1.0); pf[2] = 2.0; pf.setCoefficient(3, 3.0); // 3x^3 + 2x^2 + x pf(2); // == 34
Definition at line 90 of file Polynomial.h.
| casacore::Polynomial< T >::Polynomial | ( | ) |  [inline] | 
        
Constructs a zero'th order polynomial, with a coeficcient of 0.0.
Definition at line 96 of file Polynomial.h.
| casacore::Polynomial< T >::Polynomial | ( | uInt | order | ) |  [inline, explicit] | 
        
Makes a polynomial of the given order, with all coeficcients set to zero.
Definition at line 99 of file Polynomial.h.
| casacore::Polynomial< T >::Polynomial | ( | const Polynomial< T > & | other | ) |  [inline] | 
        
Copy constructor/assignment (deep copy).
Definition at line 102 of file Polynomial.h.
| casacore::Polynomial< T >::Polynomial | ( | const Polynomial< W > & | other | ) |  [inline] | 
        
Definition at line 104 of file Polynomial.h.
| virtual casacore::Polynomial< T >::~Polynomial | ( | ) |  [inline, virtual] | 
        
Destructor.
Definition at line 110 of file Polynomial.h.
| virtual Function<T>* casacore::Polynomial< T >::clone | ( | ) |  const [inline, virtual] | 
        
Return a copy of this object from the heap.
The caller is responsible for deleting the pointer.
Implements casacore::Function< T, U >.
Definition at line 124 of file Polynomial.h.
| virtual Function<typename FunctionTraits<T>::DiffType>* casacore::Polynomial< T >::cloneAD | ( | ) |  const [inline, virtual] | 
        
Reimplemented from casacore::Function< T, U >.
Definition at line 125 of file Polynomial.h.
| virtual Function<typename FunctionTraits<T>::BaseType>* casacore::Polynomial< T >::cloneNonAD | ( | ) |  const [inline, virtual] | 
        
Reimplemented from casacore::Function< T, U >.
Definition at line 127 of file Polynomial.h.
| Polynomial<T> casacore::Polynomial< T >::derivative | ( | ) | const | 
Return the polynomial which is the derivative of this one.
e.g.,  2+4x+5x^2 --> 0+4+10x . 
| virtual T casacore::Polynomial< T >::eval | ( | typename Function1D< T >::FunctionArg | x | ) |  const [virtual] | 
        
Evaluate the polynomial at x. 
| Polynomial<T>& casacore::Polynomial< T >::operator= | ( | const Polynomial< T > & | other | ) |  [inline] | 
        
Reimplemented from casacore::PolynomialParam< T >.
Definition at line 105 of file Polynomial.h.
Referenced by casacore::Polynomial< Double >::operator=().
 1.6.1