Package edu.jas.poly
Class GenPolynomial<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.GenPolynomial<C>
- Type Parameters:
C
- coefficient type
- All Implemented Interfaces:
AbelianGroupElem<GenPolynomial<C>>
,Element<GenPolynomial<C>>
,MonoidElem<GenPolynomial<C>>
,RingElem<GenPolynomial<C>>
,Serializable
,Comparable<GenPolynomial<C>>
,Iterable<Monomial<C>>
- Direct Known Subclasses:
GenSolvablePolynomial
public class GenPolynomial<C extends RingElem<C>>
extends Object
implements RingElem<GenPolynomial<C>>, Iterable<Monomial<C>>
GenPolynomial generic polynomials implementing RingElem. n-variate ordered
polynomials over coefficients C. The variables commute with each other and
with the coefficients. For non-commutative coefficients some care is taken to
respect the multiplication order.
Objects of this class are intended to be immutable. The implementation is
based on TreeMap respectively SortedMap from exponents to coefficients. Only
the coefficients are modeled with generic types, the exponents are fixed to
ExpVector with long entries (@see edu.jas.poly.ExpVector StorUnit). C can
also be a non integral domain, e.g. a ModInteger, i.e. it may contain zero
divisors, since multiply() does check for zeros. Note: multiply() now
checks for wrong method dispatch for GenSolvablePolynomial.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
Stored bitLength.private static final boolean
protected int
Stored hash code.private static final org.apache.logging.log4j.Logger
final GenPolynomialRing
<C> The factory for the polynomial ring.The data structure for polynomials. -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor for zero GenPolynomial.GenPolynomial
(GenPolynomialRing<C> r, C c) Constructor for GenPolynomial c * x0.GenPolynomial
(GenPolynomialRing<C> r, C c, ExpVector e) Constructor for GenPolynomial c * xe.GenPolynomial
(GenPolynomialRing<C> r, ExpVector e) Constructor for GenPolynomial xe.protected
GenPolynomial
(GenPolynomialRing<C> r, Map<ExpVector, C> v) Constructor for GenPolynomial.protected
GenPolynomial
(GenPolynomialRing<C> r, SortedMap<ExpVector, C> v) Constructor for GenPolynomial.private
GenPolynomial
(GenPolynomialRing<C> r, TreeMap<ExpVector, C> t) Private constructor for GenPolynomial. -
Method Summary
Modifier and TypeMethodDescriptionabs()
GenPolynomial absolute value, i.e.long
Returns the number of bits in the representation of this polynomial.Coefficient.Iterator over coefficients.GenPolynomial coefficient primitive part.int
compareTo
(GenPolynomial<C> b) GenPolynomial comparison.contract
(GenPolynomialRing<C> pfac) Contract variables.contractCoeff
(GenPolynomialRing<C> pfac) Contract variables to coefficient polynomial.copy()
Copy this GenPolynomial.long
degree()
Maximal degree.long
degree
(int i) Degree in variable i.long
Minimal degree.Maximal degree vector.deHomogenize
(GenPolynomialRing<C> pfac) Dehomogenize.Delta of exponent vectors.Delta of exponent vectors.GenPolynomial division.divide
(GenPolynomial<C> S) GenPolynomial division.void
GenPolynomial destructive summation.void
GenPolynomial destructive summation.void
doAddTo
(GenPolynomial<C> S) GenPolynomial destructive summation.void
doPutToMap
(ExpVector e, C c) Put an ExpVector to coefficient entry into the internal map of this GenPolynomial.void
doPutToMap
(SortedMap<ExpVector, C> vals) Put an a sorted map of exponents to coefficients into the internal map of this GenPolynomial.void
doRemoveFromMap
(ExpVector e, C c) Remove an ExpVector to coefficient entry from the internal map of this GenPolynomial.GenPolynomial<C>[]
egcd
(GenPolynomial<C> S) GenPolynomial extended greatest common divisor.boolean
Comparison with any other object.Iterator over exponents.extend
(GenPolynomialRing<C> pfac, int j, long k) Extend variables.extendLower
(GenPolynomialRing<C> pfac, int j, long k) Extend lower variables.extendUnivariate
(GenPolynomialRing<C> pfac, int i) Extend univariate to multivariate polynomial.factory()
Get the corresponding element factory.gcd
(GenPolynomial<C> S) GenPolynomial greatest common divisor.getMap()
ExpVector to coefficient map of GenPolynomial.int
hashCode()
Hash code for this polynomial.GenPolynomial<C>[]
hegcd
(GenPolynomial<C> S) GenPolynomial half extended greatest common divisor.homogenize
(GenPolynomialRing<C> pfac) Make homogeneous.inflate
(long e) GenPolynomial inflate.inverse()
GenPolynomial inverse.boolean
Is GenPolynomial<C> a constant.boolean
Is GenPolynomial<C> homogeneous.boolean
isONE()
Is GenPolynomial<C> one.boolean
isUnit()
Is GenPolynomial<C> a unit.boolean
Is GenPolynomial<C> homogeneous with respect to a weight.boolean
isZERO()
Is GenPolynomial<C> zero.iterator()
Iterator over monomials.Leading base coefficient.Leading exponent vector.Leading facet normal polynomial.Leading monomial.Leading weight polynomial.leftDivideCoeff
(C s) GenPolynomial left division.int
length()
Length of GenPolynomial.map
(UnaryFunctor<? super C, C> f) Map a unary function to the coefficients.Map a function to the polynomial stream entries.mapOnStream
(Function<? super Map.Entry<ExpVector, C>, ? extends Map.Entry<ExpVector, C>> f, boolean parallel) Map a function to the polynomial stream entries.(package private) GenPolynomial
<C> mapWrong
(UnaryFunctor<? super C, C> f) maxNorm()
GenPolynomial maximum norm.modInverse
(GenPolynomial<C> m) GenPolynomial modular inverse.monic()
GenPolynomial monic, i.e.GenPolynomial monic, i.e.GenPolynomial multiplication.GenPolynomial multiplication.GenPolynomial multiplication.multiply
(GenPolynomial<C> S) GenPolynomial multiplication.GenPolynomial multiplication.multiplyLeft
(C s) GenPolynomial left multiplication.negate()
GenPolynomial negation.GenPolynomial negation, alternative implementation.int
Number of variables.GenPolynomial<C>[]
GenPolynomial division with remainder.private void
reductum()
Reductum.remainder
(GenPolynomial<C> S) GenPolynomial remainder.reverse
(GenPolynomialRing<C> oring) Reverse variables.GenPolynomial right division.rightGcd
(GenPolynomial<C> S) GenPolynomial greatest common divisor.scaleSubtractMultiple
(C b, C a, ExpVector e, GenPolynomial<C> S) GenPolynomial scale and subtract a multiple.scaleSubtractMultiple
(C b, C a, GenPolynomial<C> S) GenPolynomial scale and subtract a multiple.scaleSubtractMultiple
(C b, ExpVector g, C a, ExpVector e, GenPolynomial<C> S) GenPolynomial scale and subtract a multiple.int
signum()
GenPolynomial signum.Spliterator over monomials.GenPolynomial square norm.GenPolynomial subtract.GenPolynomial subtraction.subtract
(GenPolynomial<C> S) GenPolynomial subtraction.GenPolynomial subtraction.subtractMultiple
(C a, ExpVector e, GenPolynomial<C> S) GenPolynomial subtract a multiple.subtractMultiple
(C a, GenPolynomial<C> S) GenPolynomial subtract a multiple.GenPolynomial addition.GenPolynomial addition.sum
(GenPolynomial<C> S) GenPolynomial summation.GenPolynomial addition.sumNorm()
GenPolynomial sum norm.toScript()
Get a scripting compatible string representation.Get a scripting compatible string representation of the factory.toString()
String representation of GenPolynomial.String representation of GenPolynomial.long
Total degree.Trailing base coefficient.Trailing exponent vector.long
Weight degree.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.jas.structure.MonoidElem
leftDivide, leftRemainder, power, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
ring
The factory for the polynomial ring. -
val
The data structure for polynomials. -
hash
protected transient int hashStored hash code. -
blen
protected transient long blenStored bitLength. -
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug
-
-
Constructor Details
-
GenPolynomial
Private constructor for GenPolynomial.- Parameters:
r
- polynomial ring factory.t
- TreeMap with correct ordering.
-
GenPolynomial
Constructor for zero GenPolynomial.- Parameters:
r
- polynomial ring factory.
-
GenPolynomial
Constructor for GenPolynomial c * xe.- Parameters:
r
- polynomial ring factory.c
- coefficient.e
- exponent.
-
GenPolynomial
Constructor for GenPolynomial c * x0.- Parameters:
r
- polynomial ring factory.c
- coefficient.
-
GenPolynomial
Constructor for GenPolynomial xe.- Parameters:
r
- polynomial ring factory.e
- exponent.
-
GenPolynomial
Constructor for GenPolynomial.- Parameters:
r
- polynomial ring factory.v
- the SortedMap of some other polynomial.
-
GenPolynomial
Constructor for GenPolynomial.- Parameters:
r
- polynomial ring factory.v
- some Map from ExpVector to coefficients.
-
-
Method Details
-
factory
Get the corresponding element factory. -
copy
Copy this GenPolynomial. -
length
public int length()Length of GenPolynomial.- Returns:
- number of coefficients of this GenPolynomial.
-
getMap
ExpVector to coefficient map of GenPolynomial.- Returns:
- val as unmodifiable SortedMap.
-
doPutToMap
Put an ExpVector to coefficient entry into the internal map of this GenPolynomial. Note: Do not use this method unless you are constructing a new polynomial. this is modified and breaks the immutability promise of this class.- Parameters:
e
- exponent.c
- coefficient.
-
doRemoveFromMap
Remove an ExpVector to coefficient entry from the internal map of this GenPolynomial. Note: Do not use this method unless you are constructing a new polynomial. this is modified and breaks the immutability promise of this class.- Parameters:
e
- exponent.c
- expected coefficient, null for ignore.
-
doPutToMap
Put an a sorted map of exponents to coefficients into the internal map of this GenPolynomial. Note: Do not use this method unless you are constructing a new polynomial. this is modified and breaks the immutability promise of this class.- Parameters:
vals
- sorted map of exponents and coefficients.
-
toString
String representation of GenPolynomial. -
toString
String representation of GenPolynomial.- Parameters:
v
- names for variables.- See Also:
-
toScript
Get a scripting compatible string representation. -
toScriptFactory
Get a scripting compatible string representation of the factory.- Specified by:
toScriptFactory
in interfaceElement<C extends RingElem<C>>
- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
isZERO
public boolean isZERO()Is GenPolynomial<C> zero.- Specified by:
isZERO
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Returns:
- If this is 0 then true is returned, else false.
- See Also:
-
isONE
public boolean isONE()Is GenPolynomial<C> one.- Specified by:
isONE
in interfaceMonoidElem<C extends RingElem<C>>
- Returns:
- If this is 1 then true is returned, else false.
- See Also:
-
isUnit
public boolean isUnit()Is GenPolynomial<C> a unit.- Specified by:
isUnit
in interfaceMonoidElem<C extends RingElem<C>>
- Returns:
- If this is a unit then true is returned, else false.
- See Also:
-
isConstant
public boolean isConstant()Is GenPolynomial<C> a constant.- Returns:
- If this is a constant polynomial then true is returned, else false.
-
isHomogeneous
public boolean isHomogeneous()Is GenPolynomial<C> homogeneous.- Returns:
- true, if this is homogeneous, else false.
-
equals
Comparison with any other object. -
hashCode
public int hashCode()Hash code for this polynomial. -
compareTo
GenPolynomial comparison. -
signum
public int signum()GenPolynomial signum.- Specified by:
signum
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Returns:
- sign(ldcf(this)).
-
numberOfVariables
public int numberOfVariables()Number of variables.- Returns:
- ring.nvar.
-
leadingMonomial
Leading monomial.- Returns:
- first map entry.
-
leadingExpVector
Leading exponent vector.- Returns:
- first exponent.
-
trailingExpVector
Trailing exponent vector.- Returns:
- last exponent.
-
leadingBaseCoefficient
Leading base coefficient.- Returns:
- first coefficient.
-
trailingBaseCoefficient
Trailing base coefficient.- Returns:
- coefficient of constant term.
-
coefficient
Coefficient.- Parameters:
e
- exponent.- Returns:
- coefficient for given exponent.
-
reductum
Reductum.- Returns:
- this - leading monomial.
-
degree
public long degree(int i) Degree in variable i.- Returns:
- maximal degree in the variable i.
-
degree
public long degree()Maximal degree.- Returns:
- maximal degree in any variables.
-
degreeMin
public long degreeMin()Minimal degree. Author: Youssef Elbarbary- Returns:
- minimal degree in any variables.
-
totalDegree
public long totalDegree()Total degree.- Returns:
- total degree in any variables.
-
weightDegree
public long weightDegree()Weight degree.- Returns:
- weight degree in all variables.
-
leadingWeightPolynomial
Leading weight polynomial.- Returns:
- polynomial with terms of maximal weight degree.
-
leadingFacetPolynomial
Leading facet normal polynomial.- Parameters:
u
- leading exponent vector.uv
- exponent vector of facet normal.- Returns:
- polynomial with terms of facet normal.
-
isWeightHomogeneous
public boolean isWeightHomogeneous()Is GenPolynomial<C> homogeneous with respect to a weight.- Returns:
- true, if this is weight homogeneous, else false.
-
degreeVector
Maximal degree vector.- Returns:
- maximal degree vector of all variables.
-
deltaExpVectors
Delta of exponent vectors.- Returns:
- list of u-v, where u = lt() and v != u in this.
-
deltaExpVectors
Delta of exponent vectors.- Parameters:
u
- marked ExpVector in this.expVectors- Returns:
- list of u-v, where v != u in this.expVectors.
-
maxNorm
GenPolynomial maximum norm.- Returns:
- ||this|| the maximum of all absolute values of coefficients.
-
sumNorm
GenPolynomial sum norm.- Returns:
- sum of all absolute values of coefficients.
-
squareNorm
GenPolynomial square norm.- Returns:
- the sum all squared values of coefficients.
-
sum
GenPolynomial summation.- Specified by:
sum
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Parameters:
S
- GenPolynomial.- Returns:
- this+S.
-
sum
GenPolynomial addition. This method is not very efficient, since this is copied.- Parameters:
a
- coefficient.e
- exponent.- Returns:
- this + a xe.
-
sum
GenPolynomial addition. This method is not very efficient, since this is copied.- Parameters:
m
- monomial.- Returns:
- this + m.
-
sum
GenPolynomial addition. This method is not very efficient, since this is copied.- Parameters:
a
- coefficient.- Returns:
- this + a x0.
-
doAddTo
GenPolynomial destructive summation.- Parameters:
S
- GenPolynomial.
-
doAddTo
GenPolynomial destructive summation.- Parameters:
a
- coefficient.e
- exponent.
-
doAddTo
GenPolynomial destructive summation.- Parameters:
a
- coefficient.
-
subtract
GenPolynomial subtraction.- Specified by:
subtract
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Parameters:
S
- GenPolynomial.- Returns:
- this-S.
-
subtract
GenPolynomial subtraction. This method is not very efficient, since this is copied.- Parameters:
a
- coefficient.e
- exponent.- Returns:
- this - a xe.
-
subtract
GenPolynomial subtraction. This method is not very efficient, since this is copied.- Parameters:
m
- monomial.- Returns:
- this - m.
-
subtract
GenPolynomial subtract. This method is not very efficient, since this is copied.- Parameters:
a
- coefficient.- Returns:
- this + a x0.
-
subtractMultiple
GenPolynomial subtract a multiple.- Parameters:
a
- coefficient.S
- GenPolynomial.- Returns:
- this - a S.
-
subtractMultiple
GenPolynomial subtract a multiple.- Parameters:
a
- coefficient.e
- exponent.S
- GenPolynomial.- Returns:
- this - a xe S.
-
scaleSubtractMultiple
GenPolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.a
- coefficient.S
- GenPolynomial.- Returns:
- this * b - a S.
-
scaleSubtractMultiple
GenPolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.a
- coefficient.e
- exponent.S
- GenPolynomial.- Returns:
- this * b - a xe S.
-
scaleSubtractMultiple
public GenPolynomial<C> scaleSubtractMultiple(C b, ExpVector g, C a, ExpVector e, GenPolynomial<C> S) GenPolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.g
- scale exponent.a
- coefficient.e
- exponent.S
- GenPolynomial.- Returns:
- this * a xg - a xe S.
-
negateAlt
GenPolynomial negation, alternative implementation.- Returns:
- -this.
-
negate
GenPolynomial negation.- Specified by:
negate
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Returns:
- -this.
-
abs
GenPolynomial absolute value, i.e. leadingCoefficient > 0.- Specified by:
abs
in interfaceAbelianGroupElem<C extends RingElem<C>>
- Returns:
- abs(this).
-
multiply
GenPolynomial multiplication.- Specified by:
multiply
in interfaceMonoidElem<C extends RingElem<C>>
- Parameters:
S
- GenPolynomial.- Returns:
- this*S.
-
multiply
GenPolynomial multiplication. Product with coefficient ring element.- Parameters:
s
- coefficient.- Returns:
- this*s.
-
multiplyLeft
GenPolynomial left multiplication. Left product with coefficient ring element.- Parameters:
s
- coefficient.- Returns:
- s*this.
-
monic
GenPolynomial monic, i.e. leadingCoefficient == 1. If leadingCoefficient is not invertible returns this unmodified.- Returns:
- monic(this).
-
monicRight
GenPolynomial monic, i.e. leadingCoefficient == 1. If leadingCoefficient is not invertible returns this unmodified.- Returns:
- monic(this).
-
multiply
GenPolynomial multiplication. Product with ring element and exponent vector.- Parameters:
s
- coefficient.e
- exponent.- Returns:
- this * s xe.
-
multiply
GenPolynomial multiplication. Product with exponent vector.- Parameters:
e
- exponent (!= null).- Returns:
- this * xe.
-
multiply
GenPolynomial multiplication. Product with 'monomial'.- Parameters:
m
- 'monomial'.- Returns:
- this * m.
-
divide
GenPolynomial division. Division by coefficient ring element. Fails, if exact division is not possible.- Parameters:
s
- coefficient.- Returns:
- s**(-1) * this.
-
rightDivideCoeff
GenPolynomial right division. Right division by coefficient ring element. Fails, if exact division is not possible.- Parameters:
s
- coefficient.- Returns:
- this * s**(-1).
-
leftDivideCoeff
GenPolynomial left division. Left division by coefficient ring element. Fails, if exact division is not possible.- Parameters:
s
- coefficient.- Returns:
- s**(-1) * this.
-
coeffPrimitivePart
GenPolynomial coefficient primitive part. Division by gcd of coefficients.- Returns:
- this/gcd(coeff(this)).
-
quotientRemainder
GenPolynomial division with remainder. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Specified by:
quotientRemainder
in interfaceMonoidElem<C extends RingElem<C>>
- Parameters:
S
- nonzero GenPolynomial with invertible leading coefficient.- Returns:
- [ quotient , remainder ] with this = quotient * S + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
divide
GenPolynomial division. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Specified by:
divide
in interfaceMonoidElem<C extends RingElem<C>>
- Parameters:
S
- nonzero GenPolynomial with invertible leading coefficient.- Returns:
- quotient with this = quotient * S + remainder.
- See Also:
-
remainder
GenPolynomial remainder. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Specified by:
remainder
in interfaceMonoidElem<C extends RingElem<C>>
- Parameters:
S
- nonzero GenPolynomial with invertible leading coefficient.- Returns:
- remainder with this = quotient * S + remainder.
- See Also:
-
gcd
GenPolynomial greatest common divisor. Only for univariate polynomials over fields. -
egcd
GenPolynomial extended greatest common divisor. Only for univariate polynomials over fields. -
hegcd
GenPolynomial half extended greatest common divisor. Only for univariate polynomials over fields.- Parameters:
S
- GenPolynomial.- Returns:
- [ gcd(this,S), a ] with a*this + b*S = gcd(this,S).
-
inverse
GenPolynomial inverse. Required by RingElem. Throws not invertible exception.- Specified by:
inverse
in interfaceMonoidElem<C extends RingElem<C>>
- Returns:
- x with this * x = 1, if it exists.
-
modInverse
GenPolynomial modular inverse. Only for univariate polynomials over fields.- Parameters:
m
- GenPolynomial.- Returns:
- a with with a*this = 1 mod m.
-
rightGcd
GenPolynomial greatest common divisor. Only for univariate polynomials over fields. -
extend
Extend variables. Used e.g. in module embedding. Extend all ExpVectors by i elements and multiply by x_j^k.- Parameters:
pfac
- extended polynomial ring factory (by i variables).j
- index of variable to be used for multiplication.k
- exponent for x_j.- Returns:
- extended polynomial.
-
extendLower
Extend lower variables. Used e.g. in module embedding. Extend all ExpVectors by i lower elements and multiply by x_j^k.- Parameters:
pfac
- extended polynomial ring factory (by i variables).j
- index of variable to be used for multiplication.k
- exponent for x_j.- Returns:
- extended polynomial.
-
contract
Contract variables. Used e.g. in module embedding. Remove i elements of each ExpVector.- Parameters:
pfac
- contracted polynomial ring factory (by i variables).- Returns:
- Map of exponents and contracted polynomials. Note: could return SortedMap
-
contractCoeff
Contract variables to coefficient polynomial. Remove i elements of each ExpVector, removed elements must be zero.- Parameters:
pfac
- contracted polynomial ring factory (by i variables).- Returns:
- contracted coefficient polynomial.
-
extendUnivariate
Extend univariate to multivariate polynomial. This is an univariate polynomial in variable i of the polynomial ring, it is extended to the given polynomial ring.- Parameters:
pfac
- extended polynomial ring factory.i
- index of the variable of this polynomial in pfac.- Returns:
- extended multivariate polynomial.
-
homogenize
Make homogeneous.- Parameters:
pfac
- extended polynomial ring factory (by 1 variable).- Returns:
- homogeneous polynomial.
-
deHomogenize
Dehomogenize.- Parameters:
pfac
- contracted polynomial ring factory (by 1 variable).- Returns:
- in homogeneous polynomial.
-
reverse
Reverse variables. Used e.g. in opposite rings.- Returns:
- polynomial with reversed variables.
-
inflate
GenPolynomial inflate. Only for univariate polynomials over fields.- Parameters:
e
- exponent.- Returns:
- this(x**e)
-
coefficientIterator
Iterator over coefficients.- Returns:
- val.values().iterator().
-
exponentIterator
Iterator over exponents.- Returns:
- val.keySet().iterator().
-
iterator
Iterator over monomials. -
spliterator
Spliterator over monomials.- Specified by:
spliterator
in interfaceIterable<C extends RingElem<C>>
- Returns:
- a PolySpliterator.
-
map
Map a unary function to the coefficients.- Parameters:
f
- evaluation functor.- Returns:
- new polynomial with coefficients f(this.coefficients).
-
mapWrong
-
mapOnStream
public GenPolynomial<C> mapOnStream(Function<? super Map.Entry<ExpVector, C>, ? extends Map.Entry<ExpVector, C>> f) Map a function to the polynomial stream entries.- Parameters:
f
- evaluation functor.- Returns:
- new polynomial with f(this.entries).
-
mapOnStream
public GenPolynomial<C> mapOnStream(Function<? super Map.Entry<ExpVector, C>, ? extends Map.Entry<ExpVector, C>> f, boolean parallel) Map a function to the polynomial stream entries.- Parameters:
f
- evaluation functor.- Returns:
- new polynomial with f(this.entries).
-
bitLength
public long bitLength()Returns the number of bits in the representation of this polynomial.- Returns:
- number of bits in the representation of this polynomial, including sign bits.
-
readObject
- Throws:
IOException
ClassNotFoundException
-