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

Class MultVariable

source code

 object --+    
          |    
array.array --+
              |
             MultVariable
Known Subclasses:

A list of Variable with multiplication as operator between themselves. Represented by array for speed optimization

Nested Classes [hide private]
  addclass
A list of Variable/ConstantObject/...
Instance Methods [hide private]
 
__init__(self, old=[], prefactor=1)
initialization of the object with default value
source code
 
get_id(self) source code
 
sort(self) source code
 
simplify(self)
simplify the product
source code
 
split(self, variables_id)
return a dict with the key being the power associated to each variables and the value being the object remaining after the suppression of all the variable
source code
 
replace(self, id, expression)
replace one object (identify by his id) by a given expression.
source code
 
get_all_var_names(self)
return the list of variable used in this multiplication
source code
 
__mul__(self, obj)
Define the multiplication with different object
source code
 
__rmul__(self, obj)
Define the multiplication with different object
source code
 
__imul__(self, obj)
Define the multiplication with different object
source code
 
__pow__(self, value) source code
 
__add__(self, obj)
define the adition with different object
source code
 
__radd__(self, obj)
define the adition with different object
source code
 
__iadd__(self, obj)
define the adition with different object
source code
 
__sub__(self, obj) source code
 
__neg__(self) source code
 
__rsub__(self, obj) source code
 
__idiv__(self, obj)
ONLY NUMBER DIVISION ALLOWED
source code
 
__div__(self, obj)
ONLY NUMBER DIVISION ALLOWED
source code
 
__truediv__(self, obj)
ONLY NUMBER DIVISION ALLOWED
source code
 
__str__(self)
String representation
source code
 
__rep__(self)
String representation
source code
 
factorize(self) source code

Inherited from array.array: __contains__, __copy__, __deepcopy__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __reduce__, __repr__, __setitem__, __setslice__, __sizeof__, append, buffer_info, byteswap, count, extend, fromfile, fromlist, fromstring, fromunicode, index, insert, pop, read, remove, reverse, tofile, tolist, tostring, tounicode, write

Inherited from object: __delattr__, __format__, __hash__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, old=[], prefactor=1) source code
Class Variables [hide private]
  vartype = 2
Properties [hide private]

Inherited from array.array: itemsize, typecode

Inherited from object: __class__

Method Details [hide private]

__new__(cls, old=[], prefactor=1)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, old=[], prefactor=1)
(Constructor)

source code 

initialization of the object with default value

Overrides: object.__init__

replace(self, id, expression)

source code 

replace one object (identify by his id) by a given expression. Note that expression cann't be zero.

__mul__(self, obj)

source code 

Define the multiplication with different object

Overrides: array.array.__mul__

__rmul__(self, obj)

source code 

Define the multiplication with different object

Overrides: array.array.__rmul__

__imul__(self, obj)

source code 

Define the multiplication with different object

Overrides: array.array.__imul__

__add__(self, obj)
(Addition operator)

source code 

define the adition with different object

Overrides: array.array.__add__

__iadd__(self, obj)

source code 

define the adition with different object

Overrides: array.array.__iadd__

__str__(self)
(Informal representation operator)

source code 

String representation

Overrides: object.__str__