Class Polynomial<R>
java.lang.Object
org.episteme.core.mathematics.analysis.functions.Polynomial<R>
Polynomial with coefficients in a ring.
Represents polynomials like: aâ‚€ + aâ‚Âx + aâ‚‚x² + ... + aâ‚™xâ¿ Supports arithmetic operations and evaluation.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionPolynomial(List<R> coefficients, Ring<R> ring) Creates a polynomial from coefficients (lowest degree first). -
Method Summary
Modifier and TypeMethodDescriptionadd(Polynomial<R> other) Adds two polynomials.coefficient(int i) Returns coefficient of x^i (alias for getCoefficient).static <R> Polynomial<R> Creates constant polynomial.intdegree()Returns degree of polynomial (highest power with non-zero coefficient).Returns derivative of polynomial.booleanEvaluates polynomial at given value.getCoefficient(int i) Returns coefficient of x^i.inthashCode()booleanisZero()Returns true if this polynomial is zero.static <R> Polynomial<R> Creates monomial: coefficient * x^degree.multiply(Polynomial<R> other) Multiplies two polynomials.static <R> Polynomial<R> Creates a polynomial from coefficients.subtract(Polynomial<R> other) Subtracts two polynomials.toString()static <R> Polynomial<R> Creates the polynomial x.static <R> Polynomial<R> Creates zero polynomial.
-
Constructor Details
-
Polynomial
-
-
Method Details
-
of
Creates a polynomial from coefficients. -
constant
Creates constant polynomial. -
x
Creates the polynomial x. -
zero
Creates zero polynomial. -
monomial
Creates monomial: coefficient * x^degree. -
degree
public int degree()Returns degree of polynomial (highest power with non-zero coefficient). -
isZero
public boolean isZero()Returns true if this polynomial is zero. -
coefficient
Returns coefficient of x^i (alias for getCoefficient). -
getCoefficient
Returns coefficient of x^i. -
add
Adds two polynomials. -
subtract
Subtracts two polynomials. -
multiply
Multiplies two polynomials. -
evaluate
-
derivative
Returns derivative of polynomial. -
toString
-
equals
-
hashCode
-