Exponented objects: Operations (Sums&Products), Items, Quotients. More...
Public Member Functions | |
def | __mul__ |
Synonym to times(). | |
def | __add__ |
Synonym to plus(). | |
def | get_sign |
Returns the sign or the sign of the first element of the object. | |
def | get_minus_signs_nb |
Returns the number of minus signs in the object. | |
def | set_exponent |
Set the value of the exponent. | |
def | set_sign |
Set the sign of the Exponented object. | |
def | set_opposite_sign |
Changes the sign of the Exponented object. | |
def | multiply_symbol_is_required |
True if the usual writing rules require a × between two factors. | |
def | requires_brackets |
True if the argument requires brackets in a product For instance, a Sum with several terms or a negative Item. | |
def | requires_inner_brackets |
True if the argument requires inner brackets The reason for requiring them is having an exponent different from 1 and several terms or factors (in the case of Products & Sums). | |
def | exponent_must_be_displayed |
True if the exponent isn't equivalent to a single 1. | |
def | contains_exactly |
True if the object contains exactly the given objct It can be used to detect objects embedded in a Sum or a Product that contain only one term (or factor). | |
def | contains_a_rounded_number |
To check if this contains a rounded number. | |
def | calculate_next_step |
Returns the next Exponented object during a numeric calculation. | |
def | expand_and_reduce_next_step |
Returns the next step of expansion/reduction of the Sum So, either the Sum of its expanded/reduced terms, or the Sum itself reduced, or None. |
Exponented objects: Operations (Sums&Products), Items, Quotients.
.. Any Exponented must have a exponent field and should reimplement the methods that are not already defined hereafter
Definition at line 787 of file __init__.py.
def obj::calc::Exponented::contains_a_rounded_number | ( | self | ) |
To check if this contains a rounded number.
..
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Operation, and obj::calc::Quotient.
Definition at line 966 of file __init__.py.
def obj::calc::Exponented::contains_exactly | ( | self, | ||
objct | ||||
) |
True if the object contains exactly the given objct It can be used to detect objects embedded in a Sum or a Product that contain only one term (or factor).
objct | The object to search for |
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Operation, and obj::calc::Quotient.
Definition at line 954 of file __init__.py.
def obj::calc::Exponented::expand_and_reduce_next_step | ( | self, | ||
options | ||||
) |
Returns the next step of expansion/reduction of the Sum So, either the Sum of its expanded/reduced terms, or the Sum itself reduced, or None.
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, obj::calc::Fraction, obj::calc::Expandable, and obj::calc::BinomialIdentity.
Definition at line 990 of file __init__.py.
def obj::calc::Exponented::exponent_must_be_displayed | ( | self | ) |
True if the exponent isn't equivalent to a single 1.
Definition at line 937 of file __init__.py.
def obj::calc::Exponented::multiply_symbol_is_required | ( | self, | ||
objct, | ||||
position | ||||
) |
True if the usual writing rules require a × between two factors.
objct | The other one | |
position | The position (integer) of self in the Product |
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.
Definition at line 898 of file __init__.py.
def obj::calc::Exponented::requires_brackets | ( | self, | ||
position | ||||
) |
True if the argument requires brackets in a product For instance, a Sum with several terms or a negative Item.
position | The position of the object in the Product |
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.
Definition at line 912 of file __init__.py.
def obj::calc::Exponented::requires_inner_brackets | ( | self | ) |
True if the argument requires inner brackets The reason for requiring them is having an exponent different from 1 and several terms or factors (in the case of Products & Sums).
Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.
Definition at line 925 of file __init__.py.
def obj::calc::Exponented::set_exponent | ( | self, | ||
arg | ||||
) |
Set the value of the exponent.
arg | Calculable|Number|String |
Reimplemented in obj::calc::Product.
Definition at line 836 of file __init__.py.
def obj::calc::Exponented::set_opposite_sign | ( | self | ) |
Changes the sign of the Exponented object.
arg | String being '+' or '-' or number being +1 or -1 |
Definition at line 875 of file __init__.py.
def obj::calc::Exponented::set_sign | ( | self, | ||
arg | ||||
) |
Set the sign of the Exponented object.
arg | String being '+' or '-' or number being +1 or -1 |
Reimplemented in obj::calc::Operation, and obj::calc::Monomial.
Definition at line 851 of file __init__.py.