Package Scientific :: Package Functions :: Module Rational :: Class RationalFunction
[hide private]
[frames] | no frames]

Class RationalFunction



Rational Function

Instances of this class represent rational functions in a single variable. They can be evaluated like functions.

Rational functions support addition, subtraction, multiplication, and division.

Instance Methods [hide private]
  __add__(self, other)
  __call__(self, value)
  __coerce__(self, other)
  __div__(self, other)
  __init__(self, numerator, denominator=[1.0])
  __mul__(self, other)
  __radd__(self, other)
  __rdiv__(self, other)
  __repr__(self)
  __rmul__(self, other)
  __rsub__(self, other)
  __sub__(self, other)
  _normalize(self)
  _truncate(self, poly)
(Scientific.Functions.Polynomial.Polynomial, RationalFunction) divide(self, shift=0)
Returns a polynomial and a rational function such that the sum of the two is equal to the original rational function.
Numeric.array poles(self)
Find the poles (zeros of the denominator) by diagonalization of the associated Frobenius matrix.
Numeric.array zeros(self)
Find the zeros (roots) of the numerator by diagonalization of the associated Frobenius matrix.

Class Variables [hide private]
  is_rational_function = 1

Method Details [hide private]

__add__(self, other)
(Addition operator)

 

__call__(self, value)
(Call operator)

 

__coerce__(self, other)

 

__div__(self, other)

 

__init__(self, numerator, denominator=[1.0])
(Constructor)

 
Parameters:

__mul__(self, other)

 

__radd__(self, other)
(Right-side addition operator)

 

__rdiv__(self, other)

 

__repr__(self)
(Representation operator)

 

__rmul__(self, other)

 

__rsub__(self, other)

 

__sub__(self, other)
(Subtraction operator)

 

_normalize(self)

 

_truncate(self, poly)

 

divide(self, shift=0)

 
Parameters:
  • shift (int (non-negative)) - the power of the independent variable by which the numerator is multiplied prior to division
Returns: (Scientific.Functions.Polynomial.Polynomial, RationalFunction)
a polynomial and a rational function such that the sum of the two is equal to the original rational function. The returned rational function's numerator is of lower order than its denominator.

poles(self)

 

Find the poles (zeros of the denominator) by diagonalization of the associated Frobenius matrix.
Returns: Numeric.array
an array containing the poles

zeros(self)

 

Find the zeros (roots) of the numerator by diagonalization of the associated Frobenius matrix.
Returns: Numeric.array
an array containing the zeros

Class Variable Details [hide private]

is_rational_function

Value:
1