Menu

Monomial

Nicolas Hainaux
Attachments
dbg_monomial.png (2538 bytes)
memo_monomial.png (3296 bytes)

A Monomial is a Product of a numeric Exponented by a literal Item. The degree must be an integer (should be a Value, but the code needs to ensure it). The 'outside' exponent is not used in Monomial's code, so maybe it is assumed to be 1. (check this...)

Possible args for __init__() :
DEFAULT | Monomial | (sign, coeff, degree) | (coeff, degree) | (RANDOMLY, max_coeff, max_degree)

Fields :
sign: the getter has been rewritten (not sure it was necessary, maybe delete this)
coeff: the coefficient of the Monomial, as a is (the numeric Exponented)
degree: the degree of the Monomial. Must be an integer.
letter: the letter of the Monomial (most of the time, and per default, it is Item 'x')
raw_value: this is used to mimic an Item in the case of a 0-degree Monomial (use carefully!)
value_inside: this is also used to mimic an Item in the case of a 0-degree Monomial (use carefully!)

Debugging info :

Check Monomial's complete doc

Back to Core Objects


Related

Doc for dev: Core Objects
Doc for dev: Exponented
Doc for dev: Item
Doc for dev: Polynomial
Doc for dev: Product

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.