Abstract mother class of Product and Sum. More...
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. |
Abstract mother class of Product and Sum.
Gathers common methods.
Definition at line 2353 of file __init__.py.
def obj::calc::Operation::__init__ | ( | self | ) |
Constructor.
Definition at line 2364 of file __init__.py.
def obj::calc::Operation::__str__ | ( | self, | ||
options | ||||
) |
Raw display of the Operation (debugging method).
options | : info='OK' let __str__ display more info |
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.
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.
..
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.
objct | The object to search for |
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.
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.
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.
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.
arg | Must be True or False (not tested) |
Definition at line 2649 of file __init__.py.