[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
|   | PolynomialView [Polynomials and root determination] |  | 
#include <vigra/polynomial.hxx>

| Public Types | |
| typedef NumericTraits < RealPromote > ::ComplexPromote | Complex | 
| typedef T const * | const_iterator | 
| typedef T * | iterator | 
| typedef NumericTraits < RealPromote >::ValueType | Real | 
| typedef NumericTraits< T > ::RealPromote | RealPromote | 
| typedef T | value_type | 
| Public Member Functions | |
| void | backwardDeflate (T v) | 
| const_iterator | begin () const | 
| iterator | begin () | 
| void | deflate (T const &r, unsigned int multiplicity=1) | 
| void | deflateConjugatePair (Complex const &v) | 
| void | differentiate (unsigned int n=1) | 
| const_iterator | end () const | 
| iterator | end () | 
| double | epsilon () const | 
| void | forwardBackwardDeflate (T v) | 
| void | forwardDeflate (T const &v) | 
| void | minimizeOrder (double epsilon=0.0) | 
| void | normalize () | 
| template<class V> | |
| PromoteTraits< T, V >::Promote | operator() (V v) const | 
| T const & | operator[] (unsigned int i) const | 
| Access the coefficient of x^i. | |
| T & | operator[] (unsigned int i) | 
| Access the coefficient of x^i. | |
| unsigned int | order () const | 
| PolynomialView (T *coeffs, unsigned int order, double epsilon=1.0e-14) | |
| void | setEpsilon (double eps) | 
| unsigned int | size () const | 
The coefficient type T can be either a scalar or complex (compatible to std::complex) type.
#include <vigra/polynomial.hxx>
| typedef NumericTraits<RealPromote>::ComplexPromote Complex | 
Complex type associated with RealPromote 
Reimplemented in Polynomial, and StaticPolynomial.
| typedef T const* const_iterator | 
Const iterator for the coefficient sequence
Reimplemented in Polynomial, and StaticPolynomial.
| typedef T* iterator | 
Iterator for the coefficient sequence
Reimplemented in Polynomial, and StaticPolynomial.
| typedef NumericTraits<RealPromote>::ValueType Real | 
Scalar type associated with RealPromote 
Reimplemented in Polynomial, and StaticPolynomial.
| typedef NumericTraits<T>::RealPromote RealPromote | 
Promote type of value_type used for polynomial calculations 
| typedef T value_type | 
Coefficient type of the polynomial
Reimplemented in Polynomial, and StaticPolynomial.
| PolynomialView | ( | T * | coeffs, | |
| unsigned int | order, | |||
| double | epsilon = 1.0e-14 | |||
| ) | 
Construct from a coefficient array of given order.
The externally managed array must have length order+1 and is interpreted as representing the polynomial:
coeffs[0] + x * coeffs[1] + x * x * coeffs[2] + ...
The coefficients are not copied, we only store a pointer to the array.epsilon (default: 1.0e-14) determines the precision of subsequent algorithms (especially root finding) performed on the polynomial. 
| void backwardDeflate | ( | T | v | ) | 
Backward-deflate the polynomial at the root r.
The behavior of this function is undefined if r is not a root. Backward deflation is best if r is the snallest root (by magnitude). 
| const_iterator begin | ( | ) | const | 
Get const_iterator for the coefficient sequence.
| iterator begin | ( | ) | 
Get iterator for the coefficient sequence.
| void deflate | ( | T const & | r, | |
| unsigned int | multiplicity = 1 | |||
| ) | 
Deflate the polynomial at the root r with the given multiplicity.
The behavior of this function is undefined if r is not a root with at least the given multiplicity. This function calls forwardBackwardDeflate(). 
| void deflateConjugatePair | ( | Complex const & | v | ) | 
Deflate the polynomial with the complex conjugate roots r and conj(r).
The behavior of this function is undefined if these are not roots.
| void differentiate | ( | unsigned int | n = 1 | ) | 
Differentiate the polynomial n times. 
| const_iterator end | ( | ) | const | 
Get end const_iterator for the coefficient sequence.
| iterator end | ( | ) | 
Get end iterator for the coefficient sequence.
| double epsilon | ( | ) | const | 
Get requested precision for polynomial algorithms (especially root finding).
| void forwardBackwardDeflate | ( | T | v | ) | 
Forward/backward eflate the polynomial at the root r.
The behavior of this function is undefined if r is not a root. Combined forward/backward deflation is best if r is an ontermediate root or we don't know r's relation to the other roots of the polynomial. 
| void forwardDeflate | ( | T const & | v | ) | 
Forward-deflate the polynomial at the root r.
The behavior of this function is undefined if r is not a root. Forward deflation is best if r is the biggest root (by magnitude). 
| void minimizeOrder | ( | double | epsilon = 0.0 | ) | 
Adjust the polynomial's order if the highest coefficients are near zero. The order is reduced as long as the absolute value does not exceed the given epsilon.
| void normalize | ( | ) | 
Normalize the polynomial, i.e. dived by the highest coefficient.
| template<class V> | |||||
| PromoteTraits< T, U >::Promote operator() | ( | U | v | ) | const | 
Evaluate the polynomial at the point v
Multiplication must be defined between the types V and PromoteTraits<T, V>::Promote. If both V and V are scalar, the result will be a scalar, otherwise it will be complex. 
| unsigned int order | ( | ) | const | 
Get order of the polynomial.
| void setEpsilon | ( | double | eps | ) | 
Set requested precision for polynomial algorithms (especially root finding).
| unsigned int size | ( | ) | const | 
Get length of the coefficient sequence (order() + 1). 
| 
© Ullrich Köthe     (ullrich.koethe@iwr.uni-heidelberg.de)  | 
html generated using doxygen and Python
 |