Package aloha :: Module aloha_lib :: Class FracVariable
[hide private]
[frames] | no frames]

Class FracVariable

source code

object --+
         |
        FracVariable

A representation of a fraction. This object simply have

The numerator/denominator can be of any type of Object.

All call function simply retranslate the call on the numerator/denominator

Instance Methods [hide private]
 
__init__(self, numerator, denominator, *opt)
initialize the frac variable
source code
 
copy(self)
return a copy of the frac variable
source code
 
simplify(self)
apply rule of simplification
source code
 
factorize(self)
made the factorization
source code
 
expand(self)
Expand the content information
source code
 
__eq__(self, obj)
Define the Equality of two Object
source code
 
__mul__(self, obj)
multiply by an object
source code
 
__rmul__(self, obj)
multiply by an object
source code
 
__div__(self, obj)
Deal with division
source code
 
__truediv__(self, obj)
Deal with division
source code
 
__add__(self, obj)
We don't need to deal with addition-substraction on this type of Object
source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  vartype = 3
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, numerator, denominator, *opt)
(Constructor)

source code 

initialize the frac variable

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)