mathmaker
0.6(alpha)
|
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...
Public Member Functions | |
def | __init__ |
Constructor. | |
def | get_a |
Gets the 'a' term of the BinomialIdentity. | |
def | get_b |
Gets the 'b' term of the BinomialIdentity. | |
def | get_kind |
Gets the kind of BinomialIdentity it is. | |
def | into_str |
Creates a string of the given object in the given ML. | |
def | expand |
The expanded object, like (2x+3)² would return (2x)²+2×2x×3+3² | |
def | expand_and_reduce_next_step |
Returns the next step of reduction of the BinomialIdentity. | |
Public Attributes | |
str_openmark | |
str_closemark | |
Properties | |
a | |
b | |
kind |
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)².
For instance, (3x-2)(3x-2) will be displayed (3x-2)². It would be complicated to derive BinomialIdentity from a Sum since a Sum isn't expandable. Let it derive simultaneously from Sum and Expandable could create problems when calling the into_str function (which of the Sum's or the Product's would be called ?).
Definition at line 8489 of file base_calculus.py.
def core.base_calculus.BinomialIdentity.__init__ | ( | self, | |
arg, | |||
options | |||
) |
Constructor.
arg | (Exponented, Exponented)|(RANDOMLY, <type>) Types details :
|
options | squares_difference Options details :
|
Reimplemented from core.base_calculus.Expandable.
Definition at line 8512 of file base_calculus.py.
References core.base_calculus.BinomialIdentity._a, core.base_calculus.BinomialIdentity._b, core.base_calculus.CommutativeOperation._compact_display, core.base_calculus.Product._compact_display, core.base_calculus.Sum._compact_display, core.base_calculus.Monomial._compact_display, core.base_calculus.Expandable._compact_display, core.base_calculus.BinomialIdentity._compact_display, core.base_calculus.Item._exponent, core.base_calculus.Function._exponent, core.base_calculus.Quotient._exponent, core.base_calculus.Fraction._exponent, core.base_calculus.Product._exponent, core.base_calculus.Sum._exponent, core.base_calculus.Monomial._exponent, core.base_calculus.BinomialIdentity._exponent, core.base_calculus.CommutativeOperation._info, core.base_calculus.Monomial._info, core.base_calculus.Expandable._info, core.base_calculus.BinomialIdentity._info, core.base_calculus.BinomialIdentity._kind, core.base_calculus.Operation._neutral, core.base_calculus.Product._neutral, core.base_calculus.Sum._neutral, core.base_calculus.Monomial._neutral, core.base_calculus.Polynomial._neutral, core.base_calculus.Expandable._neutral, core.base_calculus.BinomialIdentity._neutral, core.base_calculus.Operation._symbol, core.base_calculus.Quotient._symbol, core.base_calculus.Fraction._symbol, core.base_calculus.Product._symbol, core.base_calculus.Sum._symbol, core.base_calculus.Expandable._symbol, core.base_calculus.BinomialIdentity._symbol, core.base.Clonable.clone(), core.base_calculus.Product.reduce_(), core.base_calculus.CommutativeOperation.str_closemark, core.base_calculus.Product.str_closemark, core.base_calculus.Sum.str_closemark, core.base_calculus.Expandable.str_closemark, core.base_calculus.BinomialIdentity.str_closemark, core.base_calculus.CommutativeOperation.str_openmark, core.base_calculus.Product.str_openmark, core.base_calculus.Sum.str_openmark, core.base_calculus.Expandable.str_openmark, and core.base_calculus.BinomialIdentity.str_openmark.
Referenced by core.calculus.Equation.__init__(), and core.root_calculus.Value.substitute().
def core.base_calculus.BinomialIdentity.expand_and_reduce_next_step | ( | self, | |
options | |||
) |
Returns the next step of reduction of the BinomialIdentity.
Reimplemented from core.base_calculus.Expandable.
Definition at line 8815 of file base_calculus.py.
References core.base_calculus.Expandable.expand(), and core.base_calculus.BinomialIdentity.expand().
def core.base_calculus.BinomialIdentity.get_a | ( | self | ) |
Gets the 'a' term of the BinomialIdentity.
Definition at line 8694 of file base_calculus.py.
References core.base_calculus.BinomialIdentity._a.
def core.base_calculus.BinomialIdentity.get_b | ( | self | ) |
Gets the 'b' term of the BinomialIdentity.
Definition at line 8705 of file base_calculus.py.
References core.base_calculus.BinomialIdentity._b.
def core.base_calculus.BinomialIdentity.get_kind | ( | self | ) |
Gets the kind of BinomialIdentity it is.
Definition at line 8716 of file base_calculus.py.
References core.base_calculus.BinomialIdentity._kind.
def core.base_calculus.BinomialIdentity.into_str | ( | self, | |
options | |||
) |
Creates a string of the given object in the given ML.
options | Any options |
Reimplemented from core.base_calculus.Product.
Definition at line 8742 of file base_calculus.py.
References core.base_calculus.BinomialIdentity.a, core.base_calculus.BinomialIdentity.b, core.base_calculus.Product.factor, and core.base_calculus.BinomialIdentity.kind.
core::base_calculus.BinomialIdentity::a [static] |
property(get_a,
doc="Gets the 'a' term of the BinomialIdentity")
Definition at line 8722 of file base_calculus.py.
Referenced by core.base_calculus.BinomialIdentity.expand(), and core.base_calculus.BinomialIdentity.into_str().
core::base_calculus.BinomialIdentity::b [static] |
property(get_b,
doc="Gets the 'b' term of the BinomialIdentity")
Definition at line 8725 of file base_calculus.py.
Referenced by core.base_calculus.BinomialIdentity.expand(), and core.base_calculus.BinomialIdentity.into_str().
core::base_calculus.BinomialIdentity::kind [static] |
property(get_kind, doc="kind of BinomialIdentity it, " \ + "e.g. 'sum_square'|'difference_square'|'squares_difference'" )
Definition at line 8728 of file base_calculus.py.
Referenced by core.base_calculus.BinomialIdentity.expand(), and core.base_calculus.BinomialIdentity.into_str().