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>booleanequals(Polynomial<E> a, Polynomial<E> b) Returnstrueif 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, waitMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sumMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, addMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
isIdentity, power
-
Constructor Details
-
PolynomialRingOverRing
-
PolynomialRingOverRing
-
-
Method Details
-
getRing
-
element
-
multiply
Description copied from interface:SemigroupReturn the result of the product ab in this group. -
multiply
-
identity
Description copied from interface:MonoidReturn the identity element of this monoid. -
toString
Description copied from interface:SetReturns a human-readable string representation of an element in this set. -
add
Description copied from interface:CommutativeMonoidReturn the result of a+b.- Specified by:
addin interfaceCommutativeMonoid<E>
-
negate
Description copied from interface:AdditiveGroupReturn -a.- Specified by:
negatein interfaceAdditiveGroup<E>
-
zero
Description copied from interface:CommutativeMonoidReturn the zero element.- Specified by:
zeroin interfaceCommutativeMonoid<E>
-
equals
Description copied from interface:SetReturnstrueif 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
-