|
Assignments
Assignments
|
#include <polynomial.h>
Public Member Functions | |
| Polynomial (void) | |
| Polynomial (double c) | |
| template<unsigned int _Degree> | |
| Polynomial (const Polynomial< Dim, _Degree > &p) | |
| template<unsigned int _Degree> | |
| Polynomial & | operator= (const Polynomial< Dim, _Degree > &p) |
| template<typename ... UnsignedInts> | |
| const double & | coefficient (UnsignedInts ... indices) const |
| template<typename ... UnsignedInts> | |
| double & | coefficient (UnsignedInts ... indices) |
| template<typename ... Doubles> | |
| double | operator() (Doubles ... coordinates) const |
| double | operator() (Point< Dim > p) const |
| Polynomial< Dim, Degree-1 > | d (int dim) const |
| Polynomial< 1, Degree > | operator() (const Ray< Dim > &ray) const |
| Polynomial | operator* (double s) const |
| Polynomial | operator+ (const Polynomial &p) const |
| template<typename ... Doubles> | |
| Polynomial (Doubles ... coefficients) | |
| template<unsigned int _Degree> | |
| Polynomial (const Polynomial< 1, _Degree > &p) | |
| template<unsigned int _Degree> | |
| Polynomial< 1, Degree > & | operator= (const Polynomial< 1, _Degree > &p) |
| template<unsigned int Degree> | |
| const double & | coefficient (unsigned int d) const |
| template<unsigned int Degree> | |
| double & | coefficient (unsigned int d) |
| template<unsigned int Degree> | |
| double | operator() (double x) const |
| template<unsigned int Degree> | |
| Polynomial< 1, Degree > | operator() (const Ray< 1 > &ray) const |
| template<unsigned int Degree> | |
| Polynomial< 1, Degree > | operator+ (const Polynomial< 1, Degree > &p) const |
| unsigned int | roots (double *r) const |
| unsigned int | roots (double *r) const |
| unsigned int | roots (double *r) const |
| unsigned int | roots (double *r) const |
| unsigned int | roots (double *r) const |
| template<unsigned int _Degree> | |
| Polynomial< Dim, Degree > & | operator= (const Polynomial< Dim, _Degree > &p) |
Private Member Functions | |
| const double & | _coefficient (const unsigned int indices[], unsigned int maxDegree) const |
| double & | _coefficient (const unsigned int indices[], unsigned int maxDegree) |
| double | _evaluate (const double coordinates[], unsigned int maxDegree) const |
| Polynomial< 1, Degree > | _evaluate (const Ray< Dim > &ray, unsigned int maxDegree) const |
| bool | _isZero (unsigned int maxDegree) const |
| bool | _isConstant (unsigned int maxDegree) const |
Private Attributes | |
| Polynomial< Dim-1, Degree > | _polynomials [Degree+1] |
The generic, recursively defined, Polynomial class of total degree Degree.
| Util::Polynomial< Dim, Degree >::Polynomial | ( | void | ) |
The default constructor initializes the coefficients to zero.
| Util::Polynomial< Dim, Degree >::Polynomial | ( | double | c | ) |
This constructor creates a constant polynomial
| Util::Polynomial< Dim, Degree >::Polynomial | ( | const Polynomial< Dim, _Degree > & | p | ) |
The constructor copies over as much of the polynomial as will fit.
| Util::Polynomial< Dim, Degree >::Polynomial | ( | Doubles ... | coefficients | ) |
| Util::Polynomial< Dim, Degree >::Polynomial | ( | const Polynomial< 1, _Degree > & | p | ) |
|
private |
This method returns the specified coefficient of the polynomial.
|
private |
This method returns the specified coefficient of the polynomial.
|
private |
This method evaluates the polynomial at the specified set of coordinates.
|
private |
This method evaluates a Dim-dimensional polynomial along a Dim-dimensional Ray, and returns the associated 1-dimensional polynomial.
|
private |
This method returns true if the polynomial is a constant.
|
private |
This method returns true if the polynomial is zero.
| double & Util::Polynomial< Dim, Degree >::coefficient | ( | unsigned int | d | ) |
| const double & Util::Polynomial< Dim, Degree >::coefficient | ( | unsigned int | d | ) | const |
| double & Util::Polynomial< Dim, Degree >::coefficient | ( | UnsignedInts ... | indices | ) |
This method returns the associated coefficient of the polynomial
| const double & Util::Polynomial< Dim, Degree >::coefficient | ( | UnsignedInts ... | indices | ) | const |
This method returns the associated coefficient of the polynomial
| Polynomial< Dim, Degree-1 > Util::Polynomial< Dim, Degree >::d | ( | int | dim | ) | const |
This method returns the partial derivative with respect to the prescribed dimension.
| Polynomial< 1, Degree > Util::Polynomial< Dim, Degree >::operator() | ( | const Ray< 1 > & | ray | ) | const |
| Polynomial< 1, Degree > Util::Polynomial< Dim, Degree >::operator() | ( | const Ray< Dim > & | ray | ) | const |
This method returns the 1D polynomial obtained by evaluating the polynomial along the ray.
| double Util::Polynomial< Dim, Degree >::operator() | ( | double | x | ) | const |
| double Util::Polynomial< Dim, Degree >::operator() | ( | Doubles ... | coordinates | ) | const |
This method evaluates the polynomial at the prescribed point.
| double Util::Polynomial< Dim, Degree >::operator() | ( | Point< Dim > | p | ) | const |
This method evaluates the polynomial at the prescribed point.
| Polynomial< Dim, Degree > Util::Polynomial< Dim, Degree >::operator* | ( | double | s | ) | const |
This method returns the scalar multiple of the polynomial
| Polynomial< Dim, Degree > Util::Polynomial< Dim, Degree >::operator+ | ( | const Polynomial< Dim, Degree > & | p | ) | const |
This method returns the sum of two polynomials
| Polynomial< 1, Degree > Util::Polynomial< Dim, Degree >::operator+ | ( | const Polynomial< 1, Degree > & | p | ) | const |
| Polynomial< 1, Degree > & Util::Polynomial< Dim, Degree >::operator= | ( | const Polynomial< 1, _Degree > & | p | ) |
| Polynomial & Util::Polynomial< Dim, Degree >::operator= | ( | const Polynomial< Dim, _Degree > & | p | ) |
The equality operator copies over as much of the polynomial as will fit.
| Polynomial< Dim, Degree > & Util::Polynomial< Dim, Degree >::operator= | ( | const Polynomial< Dim, _Degree > & | p | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
The polynomials in Dim-1 dimensions. The total polynomial is assumed to be _polynomials[0] + _polynomials[1] * (x_Dim) + _polynomials[2] * (x_Dim)^2 + ...