Orbital library

## orbital.math Interface UnivariatePolynomial

All Superinterfaces:
Arithmetic, Euclidean, Function, Functor, MathFunctor, Normed, Polynomial

`public interface UnivariatePolynomialextends Euclidean, Polynomial, Function`

(Univariate) polynomial p∈R[X].

Let R be a commutative ring with 1. The polynomial ring over R in one variable X is

R[X] := {∑i∈N aiXi = (ai)i∈N ¦ ai=0 p.t. i∈N ∧ ∀i∈N ai∈R}
with the convolution as multiplication. It is an associative, graded R-algebra, and as commutative or unital as R. R[X] inherits the properties of being an integrity domain, factorial (a unique factorization domain), Noetherian from R. Additionally, if R is an integrity domain, then R[X]× = R×.

The polynomial ring over a field in one variable even is Euclidean.

Author:
André Platzer
`Polynomial`, `ValueFactory.polynomial(Arithmetic[])`, `ValueFactory.polynomial(Object)`, `ValueFactory.asPolynomial(Vector)`, `NumericalAlgorithms.polynomialInterpolation(Matrix)`

Nested Class Summary

Nested classes/interfaces inherited from interface orbital.math.functional.Function
`Function.Composite`

Nested classes/interfaces inherited from interface orbital.logic.functor.Functor
`Functor.Specification`

Nested classes/interfaces inherited from interface orbital.logic.functor.Functor
`Functor.Specification`

Field Summary

Fields inherited from interface orbital.logic.functor.Function
`callTypeDeclaration`

Method Summary
` UnivariatePolynomial` `add(UnivariatePolynomial b)`

` java.lang.Object` `apply(java.lang.Object a)`
Evaluate this polynomial at a.
` Integer` `degree()`
Get the degree of this polynomial.
` Arithmetic` `get(int i)`
Get the coefficient of Xi.
` Arithmetic[]` `getCoefficients()`
Returns an array containing all the coefficients of this polynomial.
` Vector` `getCoefficientVector()`
Returns a vector view of all the coefficients of this polynomial.
` java.util.ListIterator` `iterator()`
Returns an iterator over all coefficients (up to degree).
` UnivariatePolynomial` `modulo(UnivariatePolynomial g)`

` UnivariatePolynomial` `multiply(UnivariatePolynomial b)`

` UnivariatePolynomial` `quotient(UnivariatePolynomial g)`

` UnivariatePolynomial` `subtract(UnivariatePolynomial b)`

Methods inherited from interface orbital.math.Euclidean
`modulo, quotient`

Methods inherited from interface orbital.math.Polynomial
`add, degrees, degreeValue, get, indexSet, indices, monomials, multiply, rank, subtract`

Methods inherited from interface orbital.math.functional.Function
`derive, integrate`

Methods inherited from interface orbital.logic.functor.Functor
`equals, hashCode, toString`

Methods inherited from interface orbital.logic.functor.Functor
`equals, hashCode, toString`

Method Detail

### degree

`Integer degree()`
Get the degree of this polynomial.

This is the Euclidean degree function δ and also the graduation function for polynomials. 0 is an element of undefined or all or none degrees. So for 0 we should return `null` (or `Integer.MIN_VALUE`, but this is not recommended).

Specified by:
`degree` in interface `Euclidean`
Specified by:
`degree` in interface `Polynomial`
Returns:
deg(this) = max {i∈N ¦ ai≠0}

### get

`Arithmetic get(int i)`
Get the coefficient of Xi. Convenience method for `Polynomial.get(Arithmetic)`.

Returns:
ai if i≤deg(this), or `0` if i>deg(this).

### iterator

`java.util.ListIterator iterator()`
Returns an iterator over all coefficients (up to degree).

Specified by:
`iterator` in interface `Polynomial`
Postconditions:
always (RES.succeedes(#next()))

### apply

`java.lang.Object apply(java.lang.Object a)`
Evaluate this polynomial at a. Using the "Einsetzungshomomorphismus".

Specified by:
`apply` in interface `Function`
Specified by:
`apply` in interface `Polynomial`
Parameters:
`a` - generic Object as argument
Returns:
f(a) = f(X)|X=a = (f(X) mod (X-a))

`UnivariatePolynomial add(UnivariatePolynomial b)`

### subtract

`UnivariatePolynomial subtract(UnivariatePolynomial b)`

### multiply

`UnivariatePolynomial multiply(UnivariatePolynomial b)`

### quotient

`UnivariatePolynomial quotient(UnivariatePolynomial g)`

### modulo

`UnivariatePolynomial modulo(UnivariatePolynomial g)`

### getCoefficients

`Arithmetic[] getCoefficients()`
Returns an array containing all the coefficients of this polynomial.

Returns:
a new array containing all our coefficients.
`Object.clone()`
Postconditions:
RES[i]==get(i) ∧ RES.length==degree()+1 ∧ RES!=RES

### getCoefficientVector

`Vector getCoefficientVector()`
Returns a vector view of all the coefficients of this polynomial.

Postconditions:
RES[i]==get(i) ∧ RES.length==degree()+1

Orbital library
1.3.0: 11 Apr 2009