Mathematical arithmetic objects. More...
Classes | |
| class | Calculable |
| Abstract mother class of all mathematical objects It is not possible to implement any Calculable object. More... | |
| class | Value |
| This class embedds Numbers & Strings into a basic object. More... | |
| class | Exponented |
| Exponented objects: Operations (Sums&Products), Items, Quotients. More... | |
| class | Item |
| It's the smallest displayable element (sign, value, exponent) The value can be either numeric or literal. More... | |
| class | SquareRoot |
| It's a Exponented under a square root The Exponented can be either numeric or literal. More... | |
| class | Operation |
| Abstract mother class of Product and Sum. More... | |
| class | Product |
| Has Exponented factors & an exponent. More... | |
| class | Sum |
| Has Exponented terms & an exponent. More... | |
| class | Quotient |
| Sign, Exponented numerator, Exponented denominator, exponent. More... | |
| class | Monomial |
| A Monomial is a Product of a numeric Exponented and a literal Item. More... | |
| class | Polynomial |
| A Polynomial is a Sum of Monomials, not necessarily reduced or ordered. More... | |
| class | Fraction |
| Quotient of two numeric Sums and/or Products. More... | |
| class | Expandable |
| Mother class of all expandable objects. More... | |
| class | BinomialIdentity |
| These objects are expanded using : (a+b)² = a² + 2ab + b², (a-b)² = a² -2ab + b² and (a+b)(a-b) = a² - b² This object is a Product of two Sums but won't be displayed as is in the case of (a+b)² and (a-b)². More... | |
Functions | |
| def | reduce_literal_items_product |
| Returns the reduced Product made from the given literals list For example, [x, x², x**6] would return [x**9]. | |
| def | put_term_in_lexicon |
| A substitute for append() in a special case, for dictionaries This method checks if a "provided_key" is already in the lexicon. | |
Mathematical arithmetic objects.
| def obj::calc::put_term_in_lexicon | ( | provided_key, | ||
| associated_coeff, | ||||
| lexi | ||||
| ) |
A substitute for append() in a special case, for dictionaries This method checks if a "provided_key" is already in the lexicon.
If yes, then the associated_coeff term is added to the matching Sum. If not, the key is created and a Sum is associated which will contain associated_coeff as only term.
| provided_key | The key to use | |
| associated_coeff | The value to save in the or add to the Sum | |
| lexi | The dictionary where to put the couple key/coeff |
Definition at line 134 of file __init__.py.
| def obj::calc::reduce_literal_items_product | ( | provided_list | ) |
Returns the reduced Product made from the given literals list For example, [x, x², x**6] would return [x**9].
Notice that the Items' sign isn't managed here
| provided_list | The literal Items list |
Definition at line 68 of file __init__.py.
1.6.3