public final class UnivariatePolynomialZ64 extends Object
UnivariatePolynomial over BigIntegers.
Arithmetic operations on instances of this type may cause long overflow in which case a proper ArithmeticException will be thrown.
| Modifier and Type | Method and Description |
|---|---|
lPoly |
add(long val)
Add constant to this.
|
lPoly |
add(lPoly oth)
Adds
oth to this. |
lPoly |
addMonomial(long coefficient,
int exponent)
Adds
coefficient*x^exponent to this |
lPoly |
addMul(lPoly oth,
long factor)
Adds
oth * factor to this |
AMultivariatePolynomial |
asMultivariate(Comparator<DegreeVector> ordering)
Convert to multivariate polynomial
|
long |
cc()
Returns the constant coefficient of this poly
|
lPoly |
ccAsPoly()
Returns the constant coefficient as a constant poly
|
UnivariatePolynomialZ64 |
clone()
Deep copy of this
|
BigInteger |
coefficientRingCardinality()
Returns cardinality of the coefficient ring of this poly
|
BigInteger |
coefficientRingCharacteristic()
Returns characteristic of the coefficient ring of this poly
|
BigInteger |
coefficientRingPerfectPowerBase()
Returns
base so that coefficientRingCardinality() == base^exponent or null if cardinality is not
finite |
BigInteger |
coefficientRingPerfectPowerExponent()
Returns
exponent so that coefficientRingCardinality() == base^exponent or null if cardinality is
not finite |
String |
coefficientRingToString(IStringifier<UnivariatePolynomialZ64> stringifier)
String representation of the coefficient ring of this
|
int |
compareTo(lPoly o) |
AMultivariatePolynomial |
composition(AMultivariatePolynomial value)
Calculates the composition of this(oth)
|
lPoly |
composition(lPoly value)
Calculates the composition of this(oth) (new instance, so the content of this is not changed))
|
static UnivariatePolynomialZ64 |
constant(long value)
Returns constant with specified value
|
long |
content()
Returns the content of this poly (gcd of its coefficients)
|
lPoly |
contentAsPoly()
Returns the content of this (gcd of coefficients) as a constant poly
|
static UnivariatePolynomialZ64 |
create(long... data)
Creates Z[x] polynomial from the specified coefficients
|
UnivariatePolynomialZ64[] |
createArray(int length)
overcome Java generics...
|
UnivariatePolynomialZ64[][] |
createArray2d(int length)
overcome Java generics...
|
UnivariatePolynomialZ64[][] |
createArray2d(int length1,
int length2)
overcome Java generics...
|
lPoly |
createConstant(long val)
Creates constant polynomial with specified value (with the same coefficient ring)
|
UnivariatePolynomialZ64 |
createFromArray(long[] data)
Creates new poly with the specified coefficients (over the same ring)
|
lPoly |
createLinear(long cc,
long lc)
Creates linear polynomial of form
cc + x * lc (with the same coefficient ring) |
lPoly |
createMonomial(int degree)
Creates new monomial
x^degree (with the same coefficient ring) |
UnivariatePolynomialZ64 |
createMonomial(long coefficient,
int degree)
Creates monomial
coefficient * x^degree (with the same coefficient ring) |
lPoly |
createOne()
Returns the new instance of unit polynomial (with the same coefficient ring)
|
lPoly |
createZero()
Returns the new instance of zero polynomial (with the same coefficient ring)
|
lPoly |
decrement()
Subtracts 1 from this
|
int |
degree()
Returns the degree of this polynomial
|
UnivariatePolynomialZ64 |
derivative()
Returns the formal derivative of this poly (new instance, so the content of this is not changed)
|
UnivariatePolynomialZ64 |
divideByLC(UnivariatePolynomialZ64 other)
Divides this polynomial by the leading coefficient of
other or returns null (causing loss of
internal data) if some of the elements can't be exactly divided by the other.lc(). |
UnivariatePolynomialZ64 |
divideOrNull(long factor)
Divides this polynomial by a
factor or returns null (causing loss of internal data) if some of
the elements can't be exactly divided by the factor. |
void |
ensureInternalCapacity(int desiredCapacity)
ensures that internal storage has enough size to store
desiredCapacity elements |
boolean |
equals(Object obj) |
long |
evaluate(long point)
Evaluates this poly at a given
point (via Horner method). |
long |
evaluateAtRational(long num,
long den)
Evaluates this poly at a given rational point
num/den |
int |
firstNonZeroCoefficientPosition()
Returns position of the first non-zero coefficient, that is common monomial exponent (e.g.
|
long |
get(int i)
Returns the i-th coefficient of this poly (coefficient before x^i)
|
lPoly |
getAsPoly(int i)
Returns i-th coefficient of this as a constant polynomial
|
long[] |
getDataReferenceUnsafe()
internal API >>> direct unsafe access to internal storage
|
UnivariatePolynomialZ64 |
getRange(int from,
int to)
Creates polynomial formed from the coefficients of this starting from
from (inclusive) to to
(exclusive) |
int |
hashCode() |
lPoly |
increment()
Adds 1 to this
|
boolean |
isConstant()
Returns
true if this polynomial has only constant term |
boolean |
isMonic()
Returns
true if this polynomial is monic |
boolean |
isMonomial()
Returns
true if this polynomial has only one monomial term |
boolean |
isOne()
Returns
true if this is one |
boolean |
isOverField()
Returns whether the coefficient ring of this polynomial is a field
|
boolean |
isOverFiniteField()
Returns whether the coefficient ring of this polynomial is a finite field
|
boolean |
isOverPerfectPower()
Returns whether the
coefficientRingCardinality() is a perfect power |
boolean |
isOverZ()
Returns whether the coefficient ring of this polynomial is Z
|
boolean |
isUnitCC()
Returns true if constant term is equal to one
|
boolean |
isZero()
Returns
true if this is zero |
boolean |
isZeroAt(int i)
Returns whether i-th coefficient of this is zero
|
long |
lc()
Returns the leading coefficient of this poly
|
lPoly |
lcAsPoly()
Returns the leading coefficient as a constant poly
|
<T> UnivariatePolynomial<T> |
mapCoefficients(Ring<T> ring,
LongFunction<T> mapper)
Applies transformation function to this and returns the result.
|
long |
maxAbsCoefficient()
Returns max coefficient (by absolute value) of this poly
|
double |
mignotteBound()
Returns Mignotte's bound (sqrt(n+1) * 2^n max |this|)
|
UnivariatePolynomialZp64 |
modulus(IntegersZp64 ring)
Reduces (copied) polynomial modulo
modulus and returns the result. |
UnivariatePolynomialZp64 |
modulus(IntegersZp64 ring,
boolean copy)
Reduces this polynomial modulo
modulus and returns the result. |
UnivariatePolynomialZp64 |
modulus(long modulus)
Reduces (copied) polynomial modulo
modulus and returns the result. |
UnivariatePolynomialZp64 |
modulus(long modulus,
boolean copy)
Reduces this polynomial modulo
modulus and returns the result. |
UnivariatePolynomialZ64 |
monic()
Sets
this to its monic part (that is this divided by its leading coefficient), or returns null (causing loss of internal data) if some of the elements can't be exactly divided by the lc(). |
UnivariatePolynomialZ64 |
monic(long factor)
Sets
this to its monic part multiplied by the factor; |
lPoly |
monicWithLC(lPoly other)
Sets
this to its monic part multiplied by the leading coefficient of other; |
static UnivariatePolynomialZ64 |
monomial(long coefficient,
int exponent)
Creates monomial
coefficient * x^exponent |
lPoly |
multiply(long factor)
Multiplies this by
factor |
UnivariatePolynomialZ64 |
multiply(UnivariatePolynomialZ64 oth)
Multiplies this by
oth |
UnivariatePolynomialZ64 |
multiplyByBigInteger(BigInteger factor)
Multiplies this by
factor |
lPoly |
multiplyByLC(lPoly other)
Multiply this by the leading coefficient of
other |
lPoly |
negate()
Negates this and returns
|
double |
norm1()
Returns L1 norm of this polynomial, i.e.
|
double |
norm2()
Returns L2 norm of this polynomial, i.e.
|
double |
normMax()
Returns max coefficient (by absolute value) of this poly
|
static UnivariatePolynomialZ64 |
one()
Creates unit polynomial
|
static UnivariatePolynomialZ64 |
parse(String string)
Parse string into polynomial
|
UnivariatePolynomialZ64 |
parsePoly(String string) |
lPoly |
primitivePart()
Reduces poly to its primitive part (primitive part will always have positive l.c.)
|
lPoly |
primitivePartSameSign()
Reduces poly to its primitive part, so that primitive part will have the same signum as the initial poly
|
lPoly |
reverse()
Reverses the coefficients of this
|
boolean |
sameCoefficientRingWith(UnivariatePolynomialZ64 oth)
Returns whether
oth and this have the same coefficient ring |
lPoly |
set(int i,
long el)
Sets i-th element of this poly with the specified value
|
lPoly |
set(lPoly oth)
Sets the content of this to
oth |
lPoly |
setAndDestroy(lPoly oth)
Sets the content of this with
oth and destroys oth |
UnivariatePolynomialZ64 |
setCoefficientRingFrom(UnivariatePolynomialZ64 univariatePolynomialZ64)
Set the coefficient ring from specified poly
|
lPoly |
setFrom(int indexInThis,
lPoly poly,
int indexInPoly)
Sets i-th element of this by j-th element of other poly
|
lPoly |
setLC(long lc)
Sets hte leading coefficient of this poly with specified value
|
lPoly |
setZero(int i)
Fills i-th element with zero
|
lPoly |
shift(long value)
Shifts variable x -> x + value and returns the result (new instance)
|
lPoly |
shiftLeft(int offset)
Returns the quotient
this / x^offset, it is polynomial with coefficient list formed by shifting
coefficients of this to the left by offset. |
lPoly |
shiftRight(int offset)
Multiplies
this by the x^offset. |
int |
signumOfLC()
Gives signum of the leading coefficient
|
UnivariatePolynomialZ64 |
square()
Squares
this |
LongStream |
stream()
Returns a sequential
Stream with coefficients of this as its source. |
Stream<lPoly> |
streamAsPolys()
Stream polynomial coefficients as constant polynomials
|
lPoly |
subtract(long val)
Subtract constant from this.
|
lPoly |
subtract(lPoly oth)
Subtracts
oth from this. |
lPoly |
subtract(lPoly oth,
long factor,
int exponent)
Subtracts
factor * x^exponent * oth from this |
UnivariatePolynomial<BigInteger> |
toBigPoly()
Converts this to a polynomial over BigIntegers
|
String |
toString() |
String |
toString(IStringifier<lPoly> stringifier)
convert this to string with the use of stringifier
|
String |
toStringForCopy() |
lPoly |
toZero()
Sets this to zero
|
lPoly |
truncate(int newDegree)
Returns the remainder
this rem x^(newDegree + 1), it is polynomial formed by coefficients of this from
zero to newDegree (both inclusive) |
static UnivariatePolynomialZ64 |
zero()
Creates zero polynomial
|
finalize, getClass, notify, notifyAll, wait, wait, waitasMultivariate, composition, exponents, isLinearExactly, isLinearOrConstant, isZeroCC, mapCoefficientsAsPolys, nNonZeroTerms, sizeadd, assertSameCoefficientRingWith, canonical, coefficientRingToString, copy, createArray, createArray, createArray, monicExact, multiply, multiply, setCoefficientRingFromOptional, subtract, toPositiveLC, toStringpublic static UnivariatePolynomialZ64 parse(String string)
public static UnivariatePolynomialZ64 create(long... data)
data - coefficientspublic static UnivariatePolynomialZ64 monomial(long coefficient, int exponent)
coefficient * x^exponentcoefficient - monomial coefficientexponent - monomial exponentcoefficient * x^exponentpublic static UnivariatePolynomialZ64 zero()
public static UnivariatePolynomialZ64 one()
public static UnivariatePolynomialZ64 constant(long value)
public UnivariatePolynomialZ64 setCoefficientRingFrom(UnivariatePolynomialZ64 univariatePolynomialZ64)
IPolynomialunivariatePolynomialZ64 - the polynomialpolypublic UnivariatePolynomialZp64 modulus(long modulus, boolean copy)
modulus and returns the result.modulus - the moduluscopy - whether to copy the internal data or reduce inplace (in which case the data of this will be lost)moduluspublic UnivariatePolynomialZp64 modulus(long modulus)
modulus and returns the result.modulus - the modulusmoduluspublic UnivariatePolynomialZp64 modulus(IntegersZp64 ring, boolean copy)
modulus and returns the result.ring - the moduluscopy - whether to copy the internal data or reduce inplace (in which case the data of this will be lost)moduluspublic UnivariatePolynomialZp64 modulus(IntegersZp64 ring)
modulus and returns the result.ring - the modulusmoduluspublic UnivariatePolynomial<BigInteger> toBigPoly()
Rings.Zpublic double mignotteBound()
public long evaluateAtRational(long num,
long den)
num/dennum - point numeratorden - point denominatornum/denArithmeticException - if the result is not integerpublic UnivariatePolynomialZ64 getRange(int from, int to)
IUnivariatePolynomialfrom (inclusive) to to
(exclusive)from - the initial index of the range to be copied, inclusiveto - the final index of the range to be copied, exclusive.public UnivariatePolynomialZ64[] createArray(int length)
IPolynomialpublic UnivariatePolynomialZ64[][] createArray2d(int length)
IPolynomialpublic UnivariatePolynomialZ64[][] createArray2d(int length1, int length2)
IPolynomialpublic boolean sameCoefficientRingWith(UnivariatePolynomialZ64 oth)
IPolynomialoth and this have the same coefficient ringoth - other polynomialpublic UnivariatePolynomialZ64 createFromArray(long[] data)
data - the datapublic UnivariatePolynomialZ64 createMonomial(long coefficient, int degree)
coefficient * x^degree (with the same coefficient ring)coefficient - monomial coefficientdegree - monomial degreecoefficient * x^degreepublic boolean isOverField()
IPolynomialpublic boolean isOverFiniteField()
IPolynomialpublic boolean isOverZ()
IPolynomialpublic BigInteger coefficientRingCardinality()
IPolynomialpublic BigInteger coefficientRingCharacteristic()
IPolynomialpublic boolean isOverPerfectPower()
IPolynomialcoefficientRingCardinality() is a perfect powercoefficientRingCardinality() is a perfect powerpublic BigInteger coefficientRingPerfectPowerBase()
IPolynomialbase so that coefficientRingCardinality() == base^exponent or null if cardinality is not
finitebase so that coefficientRingCardinality() == base^exponent or null if cardinality is not
finitepublic BigInteger coefficientRingPerfectPowerExponent()
IPolynomialexponent so that coefficientRingCardinality() == base^exponent or null if cardinality is
not finiteexponent so that coefficientRingCardinality() == base^exponent or null if cardinality is
not finitepublic long content()
public UnivariatePolynomialZ64 monic()
IPolynomialthis to its monic part (that is this divided by its leading coefficient), or returns null (causing loss of internal data) if some of the elements can't be exactly divided by the lc(). NOTE:
if null is returned, the content of this is destroyed.this or nullpublic UnivariatePolynomialZ64 monic(long factor)
this to its monic part multiplied by the factor;factor - the factorthispublic UnivariatePolynomialZ64 divideOrNull(long factor)
factor or returns null (causing loss of internal data) if some of
the elements can't be exactly divided by the factor. NOTE: is null is returned, the content of
this is destroyed.factor - the factorthis divided by the factor or nullpublic UnivariatePolynomialZ64 divideByLC(UnivariatePolynomialZ64 other)
IPolynomialother or returns null (causing loss of
internal data) if some of the elements can't be exactly divided by the other.lc(). NOTE: if null
is returned, the content of this is destroyed.other - the polynomialthis divided by the other.lc() or null if exact division is not possiblepublic UnivariatePolynomialZ64 multiplyByBigInteger(BigInteger factor)
IPolynomialfactorfactor - the factorthis * factorpublic UnivariatePolynomialZ64 multiply(UnivariatePolynomialZ64 oth)
IPolynomialoth oth - the polynomialthis * oth public UnivariatePolynomialZ64 square()
IPolynomialthisthis * thispublic UnivariatePolynomialZ64 derivative()
IUnivariatePolynomialpublic UnivariatePolynomialZ64 clone()
IPolynomialclone in interface IPolynomial<UnivariatePolynomialZ64>clone in interface IUnivariatePolynomial<UnivariatePolynomialZ64>public UnivariatePolynomialZ64 parsePoly(String string)
public String coefficientRingToString(IStringifier<UnivariatePolynomialZ64> stringifier)
IPolynomialpublic AMultivariatePolynomial composition(AMultivariatePolynomial value)
IUnivariatePolynomialvalue - polynomialthis(oth)public AMultivariatePolynomial asMultivariate(Comparator<DegreeVector> ordering)
IUnivariatePolynomialpublic final int degree()
IPolynomialdegree in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final long get(int i)
public final lPoly set(int i,
long el)
public final lPoly setLC(long lc)
public final int firstNonZeroCoefficientPosition()
IUnivariatePolynomialfirstNonZeroCoefficientPosition in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final long lc()
public final lPoly lcAsPoly()
IPolynomiallcAsPoly in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly ccAsPoly()
IPolynomialccAsPoly in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public lPoly getAsPoly(int i)
IUnivariatePolynomialgetAsPoly in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>i - index in thispublic final long cc()
public final void ensureInternalCapacity(int desiredCapacity)
IUnivariatePolynomialdesiredCapacity elementsensureInternalCapacity in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly createMonomial(int degree)
IUnivariatePolynomialx^degree (with the same coefficient ring)createMonomial in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>degree - monomial degreecoefficient * x^degreepublic final lPoly createLinear(long cc,
long lc)
cc + x * lc (with the same coefficient ring)cc - the constant coefficientlc - the leading coefficientcc + x * lcpublic final lPoly createConstant(long val)
createConstant in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>val - the valuepublic final lPoly createZero()
IPolynomialcreateZero in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly createOne()
IPolynomialcreateOne in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final boolean isZeroAt(int i)
IUnivariatePolynomialisZeroAt in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>i - the positionpublic final lPoly setZero(int i)
IUnivariatePolynomialsetZero in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>i - positionpublic final lPoly setFrom(int indexInThis,
lPoly poly,
int indexInPoly)
IUnivariatePolynomialsetFrom in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>indexInThis - index in selfpoly - other polynomialindexInPoly - index in other polynomialpublic final boolean isZero()
IPolynomialtrue if this is zeroisZero in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this is zeropublic final boolean isOne()
IPolynomialtrue if this is oneisOne in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this is onepublic final boolean isMonic()
IPolynomialtrue if this polynomial is monicisMonic in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this is monicpublic final boolean isUnitCC()
IPolynomialisUnitCC in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final boolean isConstant()
IPolynomialtrue if this polynomial has only constant termisConstant in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this is constantpublic final boolean isMonomial()
IPolynomialtrue if this polynomial has only one monomial termisMonomial in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this has only one monomial termpublic final int signumOfLC()
IPolynomialsignumOfLC in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final double norm1()
thispublic final double norm2()
thispublic final double normMax()
public final long maxAbsCoefficient()
public final lPoly toZero()
IPolynomialtoZero in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly set(lPoly oth)
IPolynomialothset in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>oth - the polynomialpublic final lPoly setAndDestroy(lPoly oth)
IUnivariatePolynomialoth and destroys othsetAndDestroy in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>oth - the polynomial (will be destroyed)public final lPoly shiftLeft(int offset)
IUnivariatePolynomialthis / x^offset, it is polynomial with coefficient list formed by shifting
coefficients of this to the left by offset.shiftLeft in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>offset - shift amountthis / x^offsetpublic final lPoly shiftRight(int offset)
IUnivariatePolynomialthis by the x^offset.shiftRight in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>offset - monomial exponentthis * x^offsetpublic final lPoly truncate(int newDegree)
IUnivariatePolynomialthis rem x^(newDegree + 1), it is polynomial formed by coefficients of this from
zero to newDegree (both inclusive)truncate in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>newDegree - new degreethis rem x^(newDegree + 1)public final lPoly reverse()
IUnivariatePolynomialreverse in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly contentAsPoly()
IPolynomialcontentAsPoly in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly primitivePart()
IPolynomialprimitivePart in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final lPoly primitivePartSameSign()
IPolynomialprimitivePartSameSign in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final long evaluate(long point)
point (via Horner method).point - pointpointpublic final lPoly composition(lPoly value)
IUnivariatePolynomialcomposition in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>value - polynomialthis(oth)public final lPoly shift(long value)
value - shift amountpublic lPoly monicWithLC(lPoly other)
IPolynomialthis to its monic part multiplied by the leading coefficient of other;monicWithLC in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>other - other polynomialother or null if exact division by the
reduced leading coefficient is not possiblepublic final lPoly add(long val)
val - some numberpublic final lPoly subtract(long val)
val - some numberpublic final lPoly decrement()
IPolynomialdecrement in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this - 1public final lPoly increment()
IPolynomialincrement in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>this + 1public final lPoly add(lPoly oth)
IPolynomialoth to this.add in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>oth - the polynomialthis + othpublic final lPoly addMonomial(long coefficient,
int exponent)
coefficient*x^exponent to thiscoefficient - monomial coefficientexponent - monomial exponentthis + coefficient*x^exponentpublic final lPoly addMul(lPoly oth,
long factor)
oth * factor to thisoth - the polynomialfactor - the factorthis + oth * factor modulo moduluspublic final lPoly subtract(lPoly oth)
IPolynomialoth from this.subtract in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>oth - the polynomialthis - othpublic final lPoly subtract(lPoly oth,
long factor,
int exponent)
factor * x^exponent * oth from thisoth - the polynomialfactor - the factorexponent - the exponentthis - factor * x^exponent * othpublic final lPoly negate()
IPolynomialnegate in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public lPoly multiplyByLC(lPoly other)
IPolynomialothermultiplyByLC in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>other - polynomialpublic final lPoly multiply(long factor)
IPolynomialfactormultiply in interface IPolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>factor - the factorthis * factorpublic final long[] getDataReferenceUnsafe()
public final int compareTo(lPoly o)
compareTo in interface Comparable<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public String toString(IStringifier<lPoly> stringifier)
StringifiabletoString in interface Stringifiable<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public String toStringForCopy()
public Stream<lPoly> streamAsPolys()
IUnivariatePolynomialstreamAsPolys in interface IUnivariatePolynomial<lPoly extends cc.redberry.rings.poly.univar.AUnivariatePolynomial64<lPoly>>public final LongStream stream()
Stream with coefficients of this as its source.Stream over the coefficients in this polynomialpublic final <T> UnivariatePolynomial<T> mapCoefficients(Ring<T> ring, LongFunction<T> mapper)
stream().mapToObj(mapper).collect(new PolynomialCollector<>(ring)).T - result elements typering - ring of the new polynomialmapper - function that maps coefficients of this to coefficients of the resultmapperCopyright © 2022. All rights reserved.