Polynomial Root
PolynomialRoot(value, multiplicity=1)
dataclass
Defines a polynomial root with value and multiplicity.
is_real
property
Check if the root is real.
real
property
Return the real part of the root.
imag
property
Return the imaginary part of the root.
monic_polynomial()
with_multiplicity(multiplicity)
Return a new PolynomialRoot with a different multiplicity.
is_equivalent(root)
highest(root)
Return the root with the highest multiplicity between two equivalent roots.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
PolynomialRoot
|
Other root to compare with. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PolynomialRoot |
PolynomialRoot
|
Root with the highest multiplicity. |
Raises:
| Type | Description |
|---|---|
AssertionError
|
If the roots are not equivalent. |