obj::calc::Operation Class Reference

Abstract mother class of Product and Sum. More...

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

List of all members.

Public Member Functions

def __init__
 Constructor.
def operator
 Defines the performed Operation.
def __iter__
 It is possible to iter over the elements of an Operation.
def __getitem__
 It is possible to index an Operation.
def __len__
 Returns the number of elements of the Operation.
def __str__
 Raw display of the Operation (debugging method).
def is_numeric
 True if the Operation contains only numeric elements.
def is_literal
 True if the Operation contains only literal terms.
def is_equivalent_to_a_single_neutral
 True if the object can be displayed as a single neutral element.
def is_equivalent_to_a_single_numeric_Item
 True if the Operation contains only one numeric Item.
def is_equivalent_to_an_irreducible_Fraction
 True if the Operation contains only one irreducible Fraction.
def is_expandable
 True if the Operation contains any Expandable.
def contains_exactly
 True if the Operation contains exactly the given objct It can be used to detect objects embedded in this Operation.
def contains_a_rounded_number
 To check if this contains a rounded number.
def get_elements
 Allow the subclasses to access to their elements.
def get_info
 Allow the subclasses to access this field.
def get_letter
 If the Product is literal, returns the first factor's letter.
def get_sign
 Returns the sign of the first element of the Operation.
def set_sign
 Sets the sign of the first element of the Operation.
def set_compact_display
 Sets a value to the compact_display field.
def append
 Appends a given element to the current Operation.
def remove
 Removes a given element from the current Operation.
def evaluate
 Returns the value (number) of an numerically evaluable Operation.
def throw_away_the_neutrals
 Returns self without the equivalent-to-a-single-neutral elements.

Detailed Description

Abstract mother class of Product and Sum.

Gathers common methods.

Definition at line 2353 of file __init__.py.


Member Function Documentation

def obj::calc::Operation::__init__ (   self  ) 

Constructor.

Warning:
Operation objects are not really usable
Returns:
An "instance" of Operation

Definition at line 2364 of file __init__.py.

def obj::calc::Operation::__str__ (   self,
  options 
)

Raw display of the Operation (debugging method).

Parameters:
options : info='OK' let __str__ display more info
Returns:
A string : "<info1|info2||factor0, ..., factorn>^{exponent}" or : "[info1|info2||term0, ..., termn]^{exponent}"

Reimplemented in obj::calc::Monomial, and obj::calc::Polynomial.

Definition at line 2446 of file __init__.py.

def obj::calc::Operation::append (   self,
  elt 
)

Appends a given element to the current Operation.

Parameters:
elt The element to append (assumed to be a Exponented)

Definition at line 2663 of file __init__.py.

def obj::calc::Operation::contains_a_rounded_number (   self  ) 

To check if this contains a rounded number.

..

Returns:
True or False

Reimplemented from obj::calc::Exponented.

Definition at line 2578 of file __init__.py.

def obj::calc::Operation::contains_exactly (   self,
  objct 
)

True if the Operation contains exactly the given objct It can be used to detect objects embedded in this Operation.

Parameters:
objct The object to search for
Returns:
True if the Operation contains exactly the given objct

Reimplemented from obj::calc::Exponented.

Definition at line 2563 of file __init__.py.

def obj::calc::Operation::evaluate (   self  ) 

Returns the value (number) of an numerically evaluable Operation.

Returns:
The result as a number

Reimplemented from obj::calc::Calculable.

Definition at line 2703 of file __init__.py.

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

True if the Operation contains any Expandable.

Returns:
True|False

Reimplemented in obj::calc::Expandable.

Definition at line 2546 of file __init__.py.

def obj::calc::Operation::remove (   self,
  elt 
)

Removes a given element from the current Operation.

Parameters:
elt The element to remove (assumed to be a Exponented)

Definition at line 2675 of file __init__.py.

def obj::calc::Operation::set_compact_display (   self,
  arg 
)

Sets a value to the compact_display field.

Parameters:
arg Must be True or False (not tested)

Definition at line 2649 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