#include <RationalFunction.h>
Public Types | |
|
typedef RationalFunction< T, NumberTraits > | rational_type |
| The type of a rational function. | |
| typedef Polynomial< T, NumberTraits > | poly_type |
| The type of the rational function numerator and denominator. | |
| typedef T | number_type |
| The type of the coefficients of numerator and denominator. | |
| typedef NumberTraits | traits |
Public Member Functions | |
| RationalFunction () | |
| RationalFunction (unsigned int nom_size, unsigned int den_size) | |
| RationalFunction (const rational_type &other) | |
| RationalFunction (const poly_type &nom, const poly_type &den) | |
| RationalFunction (const poly_type &nom) | |
| ~RationalFunction () | |
| rational_type & | operator= (const rational_type &other) |
| rational_type | zero () const |
| rational_type | one () const |
| const poly_type & | nominator () const |
| const poly_type & | denominator () const |
| number_type | operator() (const number_type &val) const |
| rational_type & | normalize () |
| rational_type | operator- () const |
| rational_type & | operator+= (const rational_type &rhs) |
| rational_type | operator+ (const rational_type &rhs) const |
| rational_type & | operator-= (const rational_type &rhs) |
| rational_type | operator- (const rational_type &rhs) const |
| rational_type & | operator *= (const rational_type &rhs) |
| rational_type | operator * (const rational_type &rhs) const |
| rational_type & | operator/= (const rational_type &rhs) |
| rational_type | operator/ (const rational_type &rhs) const |
| rational_type | inverse () const |
| rational_type | operator+ (const poly_type &rhs) const |
| rational_type | operator- (const poly_type &rhs) const |
| rational_type | operator * (const poly_type &rhs) const |
| rational_type | operator/ (const poly_type &rhs) const |
| bool | operator== (const rational_type &rhs) const |
| bool | operator!= (const rational_type &rhs) const |
| bool | operator< (const rational_type &rhs) const |
| number_type | getNorm () const |
| number_type | evaluate (const number_type &arg) const |
| void | display (std::ostream &os=std::cout) const |
| void | load (std::istream &is) |
| void | save (std::ostream &os) const |
Friends | |
| rational_type | operator+ (const poly_type &lhs, const rational_type &rhs) |
| rational_type | operator- (const poly_type &lhs, const rational_type &rhs) |
| rational_type | operator * (const poly_type &lhs, const rational_type &rhs) |
| rational_type | operator/ (const poly_type &lhs, const rational_type &rhs) |
| std::ostream & | operator<< (std::ostream &os, const rational_type &r) |
| std::istream & | operator>> (std::istream &is, rational_type &r) |
Definition at line 30 of file RationalFunction.h.
| RationalFunction< T, NumberTraits >::RationalFunction | ( | ) | [inline] |
Default constructor
Definition at line 45 of file RationalFunction.h.
| RationalFunction< T, NumberTraits >::RationalFunction | ( | unsigned int | nom_size, | |
| unsigned int | den_size | |||
| ) | [inline] |
Constructor
| nom_size | Represents the count of coefficients the numerator polynomial allocates memory for | |
| den_size | Represents the count of coefficients the denominator polynomial allocates memory for |
Definition at line 56 of file RationalFunction.h.
| RationalFunction< T, NumberTraits >::RationalFunction | ( | const rational_type & | other | ) | [inline] |
Copy constructor
Definition at line 63 of file RationalFunction.h.
| RationalFunction< T, NumberTraits >::RationalFunction | ( | const poly_type & | nom, | |
| const poly_type & | den | |||
| ) | [inline] |
Constructor from components
| nom | Numerator polynomial. | |
| den | Denominator polynomial. |
Definition at line 73 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::normalize().
Here is the call graph for this function:

| RationalFunction< T, NumberTraits >::RationalFunction | ( | const poly_type & | nom | ) | [inline, explicit] |
Conversion constructor from polynomial
| nom | Numerator polynomial. |
Definition at line 82 of file RationalFunction.h.
References AlgebraicTraits< T >::one(), and Polynomial< T, NumberTraits >::size().
Here is the call graph for this function:

| RationalFunction< T, NumberTraits >::~RationalFunction | ( | ) | [inline] |
Destructor
Definition at line 96 of file RationalFunction.h.
| rational_type& RationalFunction< T, NumberTraits >::operator= | ( | const rational_type & | other | ) | [inline] |
Assignment operator
| other | Rational function to copy. |
Definition at line 104 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::m_den, and RationalFunction< T, NumberTraits >::m_nom.
| rational_type RationalFunction< T, NumberTraits >::zero | ( | ) | const [inline] |
Create the zero rational function
Definition at line 119 of file RationalFunction.h.
Referenced by RationalFunction< T, NumberTraits >::operator/=().
Here is the caller graph for this function:

| rational_type RationalFunction< T, NumberTraits >::one | ( | ) | const [inline] |
Create the unity rational function
Definition at line 136 of file RationalFunction.h.
| const poly_type& RationalFunction< T, NumberTraits >::nominator | ( | ) | const [inline] |
Access to this rational function numerator
Definition at line 152 of file RationalFunction.h.
Referenced by AlgebraicTraits< RationalFunction< ScalarType, AlgebraicTraits< ScalarType > > >::is_zero(), AlgebraicTraits< RationalFunction< ScalarType, AlgebraicTraits< ScalarType > > >::one(), and AlgebraicTraits< RationalFunction< ScalarType, AlgebraicTraits< ScalarType > > >::zero().
Here is the caller graph for this function:

| const poly_type& RationalFunction< T, NumberTraits >::denominator | ( | ) | const [inline] |
Access to this rational function denominator
Definition at line 161 of file RationalFunction.h.
| number_type RationalFunction< T, NumberTraits >::operator() | ( | const number_type & | val | ) | const [inline] |
Function call operator, evaluates this rational function at the given point.
| val | Point in which to evaluate the rational function. |
Definition at line 171 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::evaluate().
Here is the call graph for this function:

| rational_type& RationalFunction< T, NumberTraits >::normalize | ( | ) | [inline] |
Normalizes this rational function
Definition at line 181 of file RationalFunction.h.
References Polynomial< T, NumberTraits >::gcd(), AlgebraicTraits< T >::one(), and Polynomial< T, NumberTraits >::size().
Referenced by RationalFunction< T, NumberTraits >::RationalFunction().
Here is the call graph for this function:

Here is the caller graph for this function:

| rational_type RationalFunction< T, NumberTraits >::operator- | ( | ) | const [inline] |
Unary minus operator
Definition at line 201 of file RationalFunction.h.
| rational_type& RationalFunction< T, NumberTraits >::operator+= | ( | const rational_type & | rhs | ) | [inline] |
Addition assignment operator
| rhs | Right hand side operator |
Definition at line 210 of file RationalFunction.h.
References Polynomial< T, NumberTraits >::gcd(), RationalFunction< T, NumberTraits >::m_den, RationalFunction< T, NumberTraits >::m_nom, and Polynomial< T, NumberTraits >::polyDiv().
Here is the call graph for this function:

| rational_type RationalFunction< T, NumberTraits >::operator+ | ( | const rational_type & | rhs | ) | const [inline] |
Addition operator
| rhs | Right hand side operator |
Definition at line 249 of file RationalFunction.h.
| rational_type& RationalFunction< T, NumberTraits >::operator-= | ( | const rational_type & | rhs | ) | [inline] |
Subtraction assignment operator
| rhs | Right hand side operator |
Definition at line 258 of file RationalFunction.h.
References Polynomial< T, NumberTraits >::gcd(), RationalFunction< T, NumberTraits >::m_den, RationalFunction< T, NumberTraits >::m_nom, and Polynomial< T, NumberTraits >::polyDiv().
Here is the call graph for this function:

| rational_type RationalFunction< T, NumberTraits >::operator- | ( | const rational_type & | rhs | ) | const [inline] |
Subtraction operator
| rhs | Right hand side operator |
Definition at line 298 of file RationalFunction.h.
| rational_type& RationalFunction< T, NumberTraits >::operator *= | ( | const rational_type & | rhs | ) | [inline] |
Multiplication assignment operator
| rhs | Right hand side operator |
Definition at line 307 of file RationalFunction.h.
References Polynomial< T, NumberTraits >::gcd(), RationalFunction< T, NumberTraits >::m_den, RationalFunction< T, NumberTraits >::m_nom, and Polynomial< T, NumberTraits >::polyDiv().
Here is the call graph for this function:

| rational_type RationalFunction< T, NumberTraits >::operator * | ( | const rational_type & | rhs | ) | const [inline] |
Multiplication operator
| rhs | Right hand side operator |
Definition at line 341 of file RationalFunction.h.
| rational_type& RationalFunction< T, NumberTraits >::operator/= | ( | const rational_type & | rhs | ) | [inline] |
Division assignment operator
| rhs | Right hand side operator |
Definition at line 350 of file RationalFunction.h.
References Polynomial< T, NumberTraits >::gcd(), RationalFunction< T, NumberTraits >::m_den, RationalFunction< T, NumberTraits >::m_nom, Polynomial< T, NumberTraits >::polyDiv(), AlgebraicTraits< T >::zero(), and RationalFunction< T, NumberTraits >::zero().
Here is the call graph for this function:

| rational_type RationalFunction< T, NumberTraits >::operator/ | ( | const rational_type & | rhs | ) | const [inline] |
Division operator
| rhs | Right hand side operator |
Definition at line 399 of file RationalFunction.h.
| rational_type RationalFunction< T, NumberTraits >::inverse | ( | ) | const [inline] |
Get the inverse of this rational function
Definition at line 407 of file RationalFunction.h.
| rational_type RationalFunction< T, NumberTraits >::operator+ | ( | const poly_type & | rhs | ) | const [inline] |
Addition operator
| rhs | Right hand side operand |
Definition at line 420 of file RationalFunction.h.
| rational_type RationalFunction< T, NumberTraits >::operator- | ( | const poly_type & | rhs | ) | const [inline] |
Subtraction operator
| rhs | Right hand side operand |
Definition at line 430 of file RationalFunction.h.
| rational_type RationalFunction< T, NumberTraits >::operator * | ( | const poly_type & | rhs | ) | const [inline] |
Multiplication operator
| rhs | Right hand side operand |
Definition at line 440 of file RationalFunction.h.
| rational_type RationalFunction< T, NumberTraits >::operator/ | ( | const poly_type & | rhs | ) | const [inline] |
Division operator
| rhs | Right hand side operand |
Definition at line 450 of file RationalFunction.h.
| bool RationalFunction< T, NumberTraits >::operator== | ( | const rational_type & | rhs | ) | const [inline] |
Equality operator
| rhs | Right hand side operand |
Definition at line 500 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::m_den, and RationalFunction< T, NumberTraits >::m_nom.
| bool RationalFunction< T, NumberTraits >::operator!= | ( | const rational_type & | rhs | ) | const [inline] |
Inequality operator
| rhs | Right hand side operand |
Definition at line 513 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::m_den, and RationalFunction< T, NumberTraits >::m_nom.
| bool RationalFunction< T, NumberTraits >::operator< | ( | const rational_type & | rhs | ) | const [inline] |
Less than comparison operator
| rhs | Right hand side operand |
Definition at line 525 of file RationalFunction.h.
References RationalFunction< T, NumberTraits >::getNorm().
Here is the call graph for this function:

| number_type RationalFunction< T, NumberTraits >::getNorm | ( | ) | const [inline] |
Compute a norm for the rational number
Definition at line 532 of file RationalFunction.h.
Referenced by AlgebraicTraits< RationalFunction< ScalarType, AlgebraicTraits< ScalarType > > >::norm(), and RationalFunction< T, NumberTraits >::operator<().
Here is the caller graph for this function:

| number_type RationalFunction< T, NumberTraits >::evaluate | ( | const number_type & | arg | ) | const [inline] |
Evaluate the rational function at the given point.
| arg | Point in which to evaluate the rational function |
Definition at line 541 of file RationalFunction.h.
Referenced by RationalFunction< T, NumberTraits >::operator()().
Here is the caller graph for this function:

| void RationalFunction< T, NumberTraits >::display | ( | std::ostream & | os = std::cout |
) | const [inline] |
Display this rational number to a stream
| os | The stream to display into. |
Definition at line 549 of file RationalFunction.h.
| void RationalFunction< T, NumberTraits >::load | ( | std::istream & | is | ) | [inline] |
Load this from a stream
| is | stream to load from |
Definition at line 579 of file RationalFunction.h.
| void RationalFunction< T, NumberTraits >::save | ( | std::ostream & | os | ) | const [inline] |
Save this to a stream
| os | stream to save to |
Definition at line 596 of file RationalFunction.h.
| rational_type operator+ | ( | const poly_type & | lhs, | |
| const rational_type & | rhs | |||
| ) | [friend] |
Addition operator
| lhs | Left hand side operand | |
| rhs | Right hand side operand |
Definition at line 461 of file RationalFunction.h.
| rational_type operator- | ( | const poly_type & | lhs, | |
| const rational_type & | rhs | |||
| ) | [friend] |
Subtraction operator
| lhs | Left hand side operand | |
| rhs | Right hand side operand |
Definition at line 471 of file RationalFunction.h.
| rational_type operator * | ( | const poly_type & | lhs, | |
| const rational_type & | rhs | |||
| ) | [friend] |
Multiplication operator
| lhs | Left hand side operand | |
| rhs | Right hand side operand |
Definition at line 481 of file RationalFunction.h.
| rational_type operator/ | ( | const poly_type & | lhs, | |
| const rational_type & | rhs | |||
| ) | [friend] |
Division operator
| lhs | Left hand side operand | |
| rhs | Right hand side operand |
Definition at line 491 of file RationalFunction.h.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const rational_type & | r | |||
| ) | [friend] |
std::ostream insertion operator
Definition at line 560 of file RationalFunction.h.
| std::istream& operator>> | ( | std::istream & | is, | |
| rational_type & | r | |||
| ) | [friend] |
std::istream extraction operator
Definition at line 569 of file RationalFunction.h.