|
mathmaker
0.4(alpha)
|
It's a Exponented under a square root The Exponented can be either numeric or literal. More...
Public Member Functions | |
| def | __init__ |
| Constructor. | |
| def | get_iteration_list |
| Returns the list of elements to iter over. | |
| def | get_minus_signs_nb |
| Gets the number of '-' signs of the SquareRoot. | |
| def | get_force_display_sign_once |
| Gets force_display_sign_once field. | |
| def | set_force_display_sign_once |
| Sets a True|False value to the "force_display_sign_once" field. | |
| def | into_str |
| Creates a string of the given object in the given ML. | |
| def | calculate_next_step |
| Returns None|an SquareRoot. | |
| def | expand_and_reduce_next_step |
| Returns SquareRoot(self.object.expand_and_reduce_next_step()) | |
| def | dbg_str |
| Raw display of the SquareRoot (debugging method) | |
| def | __cmp__ |
| Compares two SquareRoots. | |
| def | __len__ |
| Returns the SquareRoot's length. | |
| def | turn_into_fraction |
| Turns the SquareRoot into the fraction item itself over item 1. | |
| 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 |
| Always false for SquareRoots ! | |
| def | contains_exactly |
| Always False for a SquareRoot ? | |
| def | contains_a_rounded_number |
| To check if this contains a rounded number... | |
| def | is_numeric |
| True if it's a numeric SquareRoot. | |
| def | is_literal |
| True if it's a literal SquareRoot. | |
| def | is_null |
| True if it's the null SquareRoot. | |
| def | is_displ_as_a_single_1 |
| True if it's positive w/ radicand itself eq. | |
| def | is_displ_as_a_single_minus_1 |
| True if it's negative w/ radicand itself eq. | |
| def | is_displ_as_a_single_0 |
| True if self.is_null() | |
| def | is_displ_as_a_single_numeric_Item |
| Should never be True (if it is, then self is not a SquareRoot...) | |
| def | is_displ_as_a_single_int |
| True if the object can be displayed as a single int. | |
| def | is_displ_as_a_single_neutral |
| True if the object can be considered as a neutral element. | |
| def | is_expandable |
| Depends on the radicand. | |
Public Attributes | |
| radicand | |
| sign | |
Properties | |
| force_display_sign_once | |
It's a Exponented under a square root The Exponented can be either numeric or literal.
Definition at line 1303 of file base_calculus.py.
| def core.base_calculus.SquareRoot.__init__ | ( | self, | |
| arg, | |||
| options | |||
| ) |
Constructor.
| arg | Exponented|(sign, Exponented) The given Exponented will be "embedded" in the SquareRoot |
| options | : copy='yes' can be used to produce a copy of another SquareRoot. If not used, the other SquareRoot will get embedded in a new SquareRoot. |
Definition at line 1319 of file base_calculus.py.
References core.base_calculus.Item._force_display_sign_once, core.base_calculus.Function._force_display_sign_once, core.base_calculus.SquareRoot._force_display_sign_once, core.base_calculus.Item._sign, core.base_calculus.Function._sign, core.base_calculus.SquareRoot._sign, core.base.Clonable.clone(), and core.base_calculus.SquareRoot.radicand.
Referenced by core.calculus.Equation.__init__(), and core.root_calculus.Value.substitute().
| def core.base_calculus.SquareRoot.__cmp__ | ( | self, | |
| other_item | |||
| ) |
Compares two SquareRoots.
Reimplemented from core.base_calculus.Item.
Definition at line 1559 of file base_calculus.py.
| def core.base_calculus.SquareRoot.__len__ | ( | self | ) |
Returns the SquareRoot's length.
Reimplemented from core.base_calculus.Item.
Definition at line 1571 of file base_calculus.py.
| def core.base_calculus.SquareRoot.calculate_next_step | ( | self, | |
| options | |||
| ) |
Returns None|an SquareRoot.
Reimplemented from core.base_calculus.Item.
Definition at line 1475 of file base_calculus.py.
References core.base_calculus.Item.is_numeric(), core.base_calculus.SquareRoot.is_numeric(), core.base_calculus.Item.round(), core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
Referenced by core.base_calculus.Quotient.evaluate(), core.base_calculus.CommutativeOperation.evaluate(), core.base_calculus.SquareRoot.expand_and_reduce_next_step(), core.base_calculus.Fraction.expand_and_reduce_next_step(), core.base_calculus.Product.expand_and_reduce_next_step(), and core.base_calculus.Sum.expand_and_reduce_next_step().
To check if this contains a rounded number...
Reimplemented from core.base_calculus.Item.
Definition at line 1661 of file base_calculus.py.
| def core.base_calculus.SquareRoot.contains_exactly | ( | self, | |
| objct | |||
| ) |
Always False for a SquareRoot ?
| objct | The object to search for |
Reimplemented from core.base_calculus.Item.
Definition at line 1649 of file base_calculus.py.
| def core.base_calculus.SquareRoot.dbg_str | ( | self, | |
| options | |||
| ) |
Raw display of the SquareRoot (debugging method)
| options | No option available so far |
Reimplemented from core.base_calculus.Item.
Definition at line 1544 of file base_calculus.py.
References core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
Referenced by core.base_calculus.Polynomial.__init__(), core.base_calculus.Fraction.calculate_next_step(), core.base_calculus.CommutativeOperation.evaluate(), core.base_calculus.Product.expand_and_reduce_next_step(), core.base_calculus.Sum.expand_and_reduce_next_step(), core.base_calculus.Product.get_factors_list(), core.base_calculus.Product.get_factors_list_except(), core.base_calculus.Quotient.into_str(), core.base_calculus.Product.into_str(), core.base_calculus.SquareRoot.is_displ_as_a_single_neutral(), core.base_calculus.Product.reduce_(), core.base_calculus.Sum.reduce_(), core.base_calculus.CommutativeOperation.remove(), core.base_calculus.Fraction.replace_striked_out(), core.root_calculus.Signed.set_opposite_sign(), core.root_calculus.Value.set_opposite_sign(), core.base_calculus.Fraction.simplified(), and core.calculus.Equation.solve_next_step().
Gets force_display_sign_once field.
Reimplemented from core.base_calculus.Item.
Definition at line 1386 of file base_calculus.py.
References core.base_calculus.Item._force_display_sign_once, core.base_calculus.Function._force_display_sign_once, and core.base_calculus.SquareRoot._force_display_sign_once.
| def core.base_calculus.SquareRoot.get_minus_signs_nb | ( | self | ) |
Gets the number of '-' signs of the SquareRoot.
Reimplemented from core.base_calculus.Item.
Definition at line 1372 of file base_calculus.py.
References core.root_calculus.Signed.is_negative(), core.base_calculus.Monomial.is_negative(), core.base_calculus.Item.is_null(), and core.base_calculus.SquareRoot.is_null().
| def core.base_calculus.SquareRoot.into_str | ( | self, | |
| options | |||
| ) |
Creates a string of the given object in the given ML.
| options | Any options |
Reimplemented from core.base_calculus.Item.
Definition at line 1418 of file base_calculus.py.
References core.base_calculus.Item.force_display_sign_once, core.base_calculus.SquareRoot.force_display_sign_once, core.base_calculus.Item.is_null(), core.base_calculus.SquareRoot.is_null(), core.base_calculus.Item.is_numeric(), core.base_calculus.SquareRoot.is_numeric(), core.base_calculus.Item.set_force_display_sign_once(), core.base_calculus.SquareRoot.set_force_display_sign_once(), core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
True if it's positive w/ radicand itself eq.
to a single 1
Reimplemented from core.base_calculus.Function.
Definition at line 1703 of file base_calculus.py.
References core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
Referenced by core.base_calculus.SquareRoot.is_displ_as_a_single_neutral(), core.base_calculus.Quotient.is_displ_as_a_single_neutral(), core.base_calculus.Product.is_reducible(), core.base_calculus.Sum.is_reducible(), and core.base_calculus.Sum.requires_inner_brackets().
True if it's negative w/ radicand itself eq.
to a single 1
Reimplemented from core.base_calculus.Function.
Definition at line 1716 of file base_calculus.py.
References core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
Referenced by core.base_calculus.Product.is_reducible(), and core.base_calculus.Sum.is_reducible().
| def core.base_calculus.SquareRoot.is_expandable | ( | self | ) |
Depends on the radicand.
Reimplemented from core.base_calculus.Function.
Definition at line 1779 of file base_calculus.py.
| def core.base_calculus.SquareRoot.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 from core.base_calculus.Item.
Definition at line 1594 of file base_calculus.py.
Referenced by core.base_calculus.Product.multiply_symbol_is_required(), and core.base_calculus.Sum.multiply_symbol_is_required().
| def core.base_calculus.SquareRoot.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 from core.base_calculus.Item.
Definition at line 1616 of file base_calculus.py.
References core.base_calculus.Item.force_display_sign_once, core.base_calculus.SquareRoot.force_display_sign_once, core.base_calculus.Item.sign, and core.base_calculus.SquareRoot.sign.
core::base_calculus.SquareRoot::force_display_sign_once [static] |
property(get_force_display_sign_once,
doc = "Item's force_display_sign_once field")
Reimplemented from core.base_calculus.Item.
Definition at line 1393 of file base_calculus.py.
Referenced by core.base_calculus.SquareRoot.into_str(), and core.base_calculus.SquareRoot.requires_brackets().
1.7.6.1