Poly
- the type of polynomial (self type)public interface IUnivariatePolynomial<Poly extends IUnivariatePolynomial<Poly>> extends IPolynomial<Poly>
x^i
monomial.Modifier and Type | Method and Description |
---|---|
Poly |
clone()
Deep copy of this
|
Poly |
composition(Poly value)
Calculates the composition of this(oth) (new instance, so the content of this is not changed))
|
Poly |
createMonomial(int degree)
Creates new monomial
x^degree (with the same coefficient ring) |
Poly |
derivative()
Returns the formal derivative of this poly (new instance, so the content of this is not changed)
|
void |
ensureInternalCapacity(int desiredCapacity)
ensures that internal storage has enough size to store
desiredCapacity elements |
default gnu.trove.set.hash.TIntHashSet |
exponents()
Returns a set of exponents of non-zero terms
|
int |
firstNonZeroCoefficientPosition()
Returns position of the first non-zero coefficient, that is common monomial exponent (e.g.
|
Poly |
getAsPoly(int i)
Returns i-th coefficient of this as a constant polynomial
|
Poly |
getRange(int from,
int to)
Creates polynomial formed from the coefficients of this starting from
from (inclusive) to to
(exclusive) |
boolean |
isZeroAt(int i)
Returns whether i-th coefficient of this is zero
|
default Poly |
parsePoly(String string,
String[] variables)
Parse string representation of polynomial
|
Poly |
reverse()
Reverses the coefficients of this
|
Poly |
setAndDestroy(Poly oth)
Sets the content of this with
oth and destroys oth |
Poly |
setFrom(int indexInThis,
Poly poly,
int indexInPoly)
Sets i-th element of this by j-th element of other poly
|
Poly |
setZero(int i)
Fills i-th element with zero
|
Poly |
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 . |
Poly |
shiftRight(int offset)
Multiplies
this by the x^offset . |
default int |
size()
Returns the degree of this polynomial
|
Poly |
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) |
add, add, assertSameCoefficientRingWith, ccAsPoly, coefficientRingCardinality, coefficientRingCharacteristic, coefficientRingPerfectPowerBase, coefficientRingPerfectPowerExponent, coefficientRingToString, contentAsPoly, copy, createArray, createArray, createArray, createArray2d, createArray2d, createConstant, createOne, createZero, decrement, degree, divideByLC, increment, isConstant, isMonic, isMonomial, isOne, isOverField, isOverFiniteField, isOverPerfectPower, isOverZ, isUnitCC, isZero, lcAsPoly, monic, monicExact, monicWithLC, multiply, multiply, multiply, multiply, multiplyByBigInteger, multiplyByLC, negate, parsePoly, primitivePart, primitivePartSameSign, sameCoefficientRingWith, set, setCoefficientRingFrom, signumOfLC, square, subtract, subtract, toString, toZero
compareTo
defaultVars
default int size()
size
in interface IPolynomial<Poly extends IUnivariatePolynomial<Poly>>
boolean isZeroAt(int i)
i
- the positionPoly setZero(int i)
i
- positionPoly setFrom(int indexInThis, Poly poly, int indexInPoly)
indexInThis
- index in selfpoly
- other polynomialindexInPoly
- index in other polynomialPoly getAsPoly(int i)
i
- index in thisdefault gnu.trove.set.hash.TIntHashSet exponents()
int firstNonZeroCoefficientPosition()
Poly shiftLeft(int offset)
this / x^offset
, it is polynomial with coefficient list formed by shifting
coefficients of this
to the left by offset
.offset
- shift amountthis / x^offset
Poly shiftRight(int offset)
this
by the x^offset
.offset
- monomial exponentthis * x^offset
Poly truncate(int newDegree)
this rem x^(newDegree + 1)
, it is polynomial formed by coefficients of this from
zero to newDegree
(both inclusive)newDegree
- new degreethis rem x^(newDegree + 1)
Poly getRange(int from, int to)
from
(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.Poly reverse()
Poly createMonomial(int degree)
x^degree
(with the same coefficient ring)degree
- monomial degreecoefficient * x^degree
Poly derivative()
Poly clone()
IPolynomial
clone
in interface IPolynomial<Poly extends IUnivariatePolynomial<Poly>>
Poly setAndDestroy(Poly oth)
oth
and destroys othoth
- the polynomial (will be destroyed)Poly composition(Poly value)
value
- polynomialthis(oth)
void ensureInternalCapacity(int desiredCapacity)
desiredCapacity
elementsdefault Poly parsePoly(String string, String[] variables)
IPolynomial
parsePoly
in interface IPolynomial<Poly extends IUnivariatePolynomial<Poly>>
string
- stringvariables
- names of variablesCopyright © 2017. All rights reserved.