Class PolynomialRingOverRing<E>
java.lang.Object
dk.jonaslindstrom.ruffini.polynomials.structures.PolynomialRingOverRing<E>
- All Implemented Interfaces:
AdditiveGroup<Polynomial<E>>
,CommutativeMonoid<Polynomial<E>>
,Monoid<Polynomial<E>>
,Ring<Polynomial<E>>
,Semigroup<Polynomial<E>>
,SemiRing<Polynomial<E>>
,Set<Polynomial<E>>
- Direct Known Subclasses:
PolynomialRing
-
Constructor Summary
ConstructorsConstructorDescriptionPolynomialRingOverRing
(Ring<E> ring) PolynomialRingOverRing
(Ring<E> ring, String variable) -
Method Summary
Modifier and TypeMethodDescriptionadd
(Polynomial<E> a, Polynomial<E> b) Return the result of a+b.Pair<Polynomial<E>,
Polynomial<E>> divisionWithRemainder
(Polynomial<E> a, Polynomial<E> b) Perform polynomial division, eg.Pair<Polynomial<E>,
Polynomial<E>> divisionWithRemainder
(Polynomial<E> a, Polynomial<E> b, E bLeadInverse) Perform polynomial division, eg.final Polynomial<E>
boolean
equals
(Polynomial<E> a, Polynomial<E> b) Returnstrue
if and only if a = b as elements of this set.getRing()
identity()
Return the identity element of this monoid.multiply
(Polynomial<E> a, Polynomial<E> b) Return the result of the product ab in this group.multiply
(E a, Polynomial<E> b) negate
(Polynomial<E> a) Return -a.toString()
toString
(Polynomial<E> a) Returns a human-readable string representation of an element in this set.zero()
Return the zero element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
isIdentity, power
-
Constructor Details
-
PolynomialRingOverRing
-
PolynomialRingOverRing
-
-
Method Details
-
getRing
-
element
-
multiply
Description copied from interface:Semigroup
Return the result of the product ab in this group. -
multiply
-
identity
Description copied from interface:Monoid
Return the identity element of this monoid. -
toString
Description copied from interface:Set
Returns a human-readable string representation of an element in this set. -
add
Description copied from interface:CommutativeMonoid
Return the result of a+b.- Specified by:
add
in interfaceCommutativeMonoid<E>
-
negate
Description copied from interface:AdditiveGroup
Return -a.- Specified by:
negate
in interfaceAdditiveGroup<E>
-
zero
Description copied from interface:CommutativeMonoid
Return the zero element.- Specified by:
zero
in interfaceCommutativeMonoid<E>
-
equals
Description copied from interface:Set
Returnstrue
if and only if a = b as elements of this set. -
divisionWithRemainder
Perform polynomial division, eg. finding a quotient q and a remainder r with degree smaller than the divisor b s.t. a = qb + r.- Parameters:
a
- The dividend.b
- The divisor. It is assumed that this is a monic polynomial.
-
divisionWithRemainder
public Pair<Polynomial<E>,Polynomial<E>> divisionWithRemainder(Polynomial<E> a, Polynomial<E> b, E bLeadInverse) Perform polynomial division, eg. finding a quotient q and a remainder r with degree smaller than b s.t. a = qb + r.- Parameters:
a
- The dividend.b
- The divisor.bLeadInverse
- An inverse of the leading coefficient of b.
-
toString
-