Home | Trees | Index | Help |
|
---|
Module pypol :: Class AlgebraicFraction |
|
object
--+
|
AlgebraicFraction
Provide object representing an algebraic fraction given numerator and denominator, that could be Monomial or Polynomial instances or even numbers.
Example:>>> a = Polynomial([Monomial(2, x=2), Monomial(-3, z=1)]) >>> b = Polynomial([Monomial(4, y=4), Monomial(1, z=3)]) >>> print a/b 2 2 x - 3 z --------- 4 3 4 y + z
Method Summary | |
---|---|
Build the algebraic fraction given numerator and denominator and check if the numerator and the denominator values are right. | |
__div__(self,
my_AF)
| |
__eq__(self,
my_AF)
| |
__mul__(self,
my_AF)
| |
Division with swapped operands. | |
eval(repr(algebraicFractionInstance)) should be equal to algebraicFractionInstance. | |
Multiplication with swapped operands. | |
Transform the object in a human-readable string. | |
Division with __future__.division. | |
Check if the second term of an operation is an AlgebraicFraction | |
Given the unknowns of the fraction, return the result of the function myAlgebraicFraction(x, y, ...) | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Method Details |
---|
__init__(self,
numer,
denom=1)
|
__rdiv__(self, my_AF)Division with swapped operands. See also method __div__. |
__repr__(self)
|
__rmul__(self, my_AF)Multiplication with swapped operands. |
__str__(self)
|
__truediv__(self, my_AF)Division with __future__.division. See also method __div__. |
check_second_term(wrapped)Check if the second term of an operation is an AlgebraicFraction |
eval(self, **unknowns)Given the unknowns of the fraction, return the result of the function myAlgebraicFraction(x, y, ...) Example:>>> a = Polynomial([Monomial(2, x=2)]) >>> b = Polynomial([Monomial(4, y=4), Monomial(1, z=3)]) >>> c = AlgebraicFraction(a, b) >>> print c.eval(x=3, y=2, z=1) 18/65Ignore exceeding arguments. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Aug 10 15:00:04 2007 | http://epydoc.sf.net |