obj::calc::Expandable Class Reference

Mother class of all expandable objects. More...

Inheritance diagram for obj::calc::Expandable:
obj::calc::Product obj::calc::Operation obj::calc::Exponented obj::calc::Calculable obj::Printable obj::calc::BinomialIdentity

List of all members.

Public Member Functions

def __init__
 Constructor.
def is_expandable
 True.
def expand
 The expanded object, like 2×(x+3) would return 2×x + 2×3.
def expand_and_reduce_
 The expanded & reduced object, like 2×(x+3) would return 2x + 6 Take care that the resulting Sum might not be reduced itself.
def expand_and_reduce_next_step
 Returns the expanded object as a Sum.

Detailed Description

Mother class of all expandable objects.

Definition at line 8294 of file __init__.py.


Member Function Documentation

def obj::calc::Expandable::__init__ (   self,
  arg,
  options 
)

Constructor.

Parameters:
arg (Exponented, Exponented)|(__.RANDOMLY, <type>) Types details :

  • monom0_polyn1 will create this kind of objects : 5(3x-2)
  • monom1_polyn1 will create this kind of objects : -5x(2-3x)
  • polyn1_polyn1 will create this kind of objects : (5x+1)(3x-2)
  • minus_polyn1_polyn1 will create -<polyn1_polyn1>
options reversed|randomly_reversed=<nb> Options details :

  • reversed will change the sums' order. This is useless if the sums are the same kind of objects (like (2x+3)(3x-7))
  • randomly_reversed=0.3 will change the sums' order in a ratio of 0.3
Warning:
Might raise an UncompatibleType exception.

Reimplemented in obj::calc::BinomialIdentity.

Definition at line 8315 of file __init__.py.

def obj::calc::Expandable::expand_and_reduce_ (   self  ) 

The expanded & reduced object, like 2×(x+3) would return 2x + 6 Take care that the resulting Sum might not be reduced itself.

For instance, (3 + x)(2x - 5) would return 6x - 15 + 2x² - 5x The rest of the calculation has to be done with the Sum's reduction method ?

Definition at line 8490 of file __init__.py.

def obj::calc::Expandable::is_expandable (   self  ) 

True.

Returns:
True

Reimplemented from obj::calc::Operation.

Definition at line 8435 of file __init__.py.


The documentation for this class was generated from the following file:
Generated on Fri Dec 30 19:26:37 2011 for mathmaker by  doxygen 1.6.3