Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_real_polynomial Class Reference

#include <vnl_real_polynomial.h>

Collaboration diagram for vnl_real_polynomial:

Collaboration graph
[legend]
List of all members.

Public Methods

 vnl_real_polynomial (vnl_vector< double > const &a)
 vnl_real_polynomial (double const *a, int len)
 vnl_real_polynomial (int d)
double evaluate (double x) const
vcl_complex< double > evaluate (vcl_complex< double > const &x) const
vcl_complex< double > devaluate (vcl_complex< double > const &x) const
int degree () const
double & operator[] (int i)
double operator[] (int i) const
const vnl_vector< double > & coefficients () const
vnl_vector< double > & coefficients ()
void set_coefficients (const vnl_vector< double > &coeffs)

Protected Attributes

vnl_vector< double > coeffs_

Detailed Description

Evaluation of real polynomials at real and complex points. vnl_real_polynomial represents a univariate polynomial with real coefficients, stored as a vector of doubles. This allows evaluation of the polynomial at given values of , or of its derivative .

Roots may be extracted using the roots() method.

Definition at line 31 of file vnl_real_polynomial.h.


Constructor & Destructor Documentation

vnl_real_polynomial::vnl_real_polynomial vnl_vector< double > const &    a [inline]
 

Initialize polynomial. The polynomial is .

Definition at line 36 of file vnl_real_polynomial.h.

References coeffs_.

vnl_real_polynomial::vnl_real_polynomial double const *    a,
int    len
[inline]
 

Initialize polynomial from C vector. The parameter len is the number of coefficients, one greater than the degree.

Definition at line 42 of file vnl_real_polynomial.h.

vnl_real_polynomial::vnl_real_polynomial int    d [inline]
 

Initialize polynomial of a given degree.

Definition at line 46 of file vnl_real_polynomial.h.

References coeffs_, and vnl_vector< double >::size().


Member Function Documentation

vnl_vector<double>& vnl_real_polynomial::coefficients   [inline]
 

Return the vector of coefficients.

Definition at line 86 of file vnl_real_polynomial.h.

const vnl_vector<double>& vnl_real_polynomial::coefficients   const [inline]
 

Return the vector of coefficients.

Definition at line 83 of file vnl_real_polynomial.h.

int vnl_real_polynomial::degree   const [inline]
 

Return the degree (highest power of x) of the polynomial.

Definition at line 72 of file vnl_real_polynomial.h.

References coeffs_.

vcl_complex<double> vnl_real_polynomial::devaluate vcl_complex< double > const &    x const
 

Evaluate derivative at complex value x.

vcl_complex<double> vnl_real_polynomial::evaluate vcl_complex< double > const &    x const
 

Evaluate polynomial at complex value x.

double vnl_real_polynomial::evaluate double    x const
 

Evaluate polynomial at value x.

double vnl_real_polynomial::operator[] int    i const [inline]
 

Access to the polynomial coefficients.

Definition at line 79 of file vnl_real_polynomial.h.

References coeffs_.

double& vnl_real_polynomial::operator[] int    i [inline]
 

Access to the polynomial coefficients.

Definition at line 76 of file vnl_real_polynomial.h.

void vnl_real_polynomial::set_coefficients const vnl_vector< double > &    coeffs [inline]
 

Definition at line 88 of file vnl_real_polynomial.h.


Member Data Documentation

vnl_vector<double> vnl_real_polynomial::coeffs_ [protected]
 

The coefficients of the polynomial. coeffs_[0] is the const term. coeffs_[n] is the coefficient of the x^n term.

Definition at line 97 of file vnl_real_polynomial.h.

Referenced by degree(), operator[](), and vnl_real_polynomial().


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:13:38 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000