Feat(core): add power attribut to MOPolynomial
This commit is contained in:
parent
1c02b57476
commit
79aaa3c5d9
@ -71,8 +71,8 @@ class MOpolynomial(MO):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def degree(self):
|
def degree(self):
|
||||||
"""
|
"""
|
||||||
Maximum degree of its coefficient
|
Maximum degree of its coefficient
|
||||||
|
|
||||||
:example:
|
:example:
|
||||||
>>> p = MOpolynomial('x', [1, 2, 3])
|
>>> p = MOpolynomial('x', [1, 2, 3])
|
||||||
@ -85,6 +85,10 @@ class MOpolynomial(MO):
|
|||||||
"""
|
"""
|
||||||
return max(self._coefs.keys())
|
return max(self._coefs.keys())
|
||||||
|
|
||||||
|
@property
|
||||||
|
def power(self):
|
||||||
|
return self.degree
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def coefficients(self):
|
def coefficients(self):
|
||||||
return self._coefs
|
return self._coefs
|
||||||
|
Loading…
Reference in New Issue
Block a user