java.lang.Cloneable
public class BigIntegerPoly
extends java.lang.Object
implements java.lang.Cloneable
Constructor | Description |
---|---|
BigIntegerPoly() |
Default ctor.
|
BigIntegerPoly(java.lang.String L) |
Ctor with a comma-separated list as the list of coefficients.
|
BigIntegerPoly(java.math.BigInteger[] c) |
Ctor with a list of coefficients.
|
BigIntegerPoly(java.util.Vector<java.math.BigInteger> c) |
Ctor with a list of coefficients.
|
Modifier and Type | Method | Description |
---|---|---|
BigIntegerPoly |
add(BigIntegerPoly val) |
Add another polynomial
|
java.math.BigInteger |
at(int n) |
Retrieve a polynomial coefficient.
|
BigIntegerPoly |
binomialTInv(int maxdeg) |
Inverse Binomial transform.
|
BigIntegerPoly |
clone() |
Create a copy of this.
|
int |
degree() |
Polynomial degree.
|
BigIntegerPoly |
derive() |
First derivative.
|
BigIntegerPoly[] |
divideAndRemainder(BigIntegerPoly val) |
Divide by another polynomial.
|
protected java.util.Vector<BigIntegerPoly> |
i2roots() |
Generate the factors which are 2nd degree polynomials.
|
java.util.Vector<BigIntegerPoly> |
ifactor() |
Factorization into integer polynomials.
|
java.util.Vector<java.math.BigInteger> |
iroots() |
Generate the integer roots of the polynomial.
|
boolean |
isZero() |
Test whether this polynomial value is zero.
|
int |
ldegree() |
Polynomial lower degree.
|
BigIntegerPoly |
multiply(BigIntegerPoly val) |
Multiply by another polynomial
|
BigIntegerPoly |
multiply(java.math.BigInteger val) |
Multiply by a constant factor.
|
BigIntegerPoly |
pow(int n) |
Raise to a positive power.
|
int |
rootDeg(java.math.BigInteger r) |
Compute the order of the root r.
|
void |
set(int n,
int value) |
Set a polynomial coefficient.
|
void |
set(int n,
java.math.BigInteger value) |
Set a polynomial coefficient.
|
protected void |
simplify() |
Simplify the representation.
|
int |
size() |
Count of coefficients.
|
BigIntegerPoly |
subtract(BigIntegerPoly val) |
Subtract another polynomial
|
java.lang.String |
toPString() |
Print as a polyomial in x.
|
etomica.veos.bigdecimal.RatPoly |
toRatPoly() |
Translate into a RatPoly copy.
|
java.lang.String |
toString() |
Print as a comma-separated list of coefficients.
|
BigIntegerPoly |
trunc(int newdeg) |
Truncate polynomial degree.
|
java.math.BigInteger |
valueOf(int x) |
Horner scheme to find the function value at the argument x
|
java.math.BigInteger |
valueOf(java.math.BigInteger x) |
Evaluate at some integer argument.
|
public BigIntegerPoly()
public BigIntegerPoly(java.lang.String L) throws java.lang.NumberFormatException
L
- the string of the form a0,a1,a2,a3 with the coefficientsjava.lang.NumberFormatException
public BigIntegerPoly(java.util.Vector<java.math.BigInteger> c)
c
- The coefficients a0, a1, a2 etc in a0+a1*x+a2*x^2+...public BigIntegerPoly(java.math.BigInteger[] c)
c
- The coefficients a0, a1, a2 etc in a0+a1*x+a2*x^2+...public BigIntegerPoly clone()
clone
in class java.lang.Object
public etomica.veos.bigdecimal.RatPoly toRatPoly()
public java.math.BigInteger at(int n)
n
- the zero-based index of the coefficient. n=0 for the constant term.public java.math.BigInteger valueOf(java.math.BigInteger x)
x
- The abscissa point of the evaluationpublic java.math.BigInteger valueOf(int x)
x
- The argument x.public void set(int n, java.math.BigInteger value)
n
- the zero-based index of the coefficient. n=0 for the constant term.
If the polynomial has not yet the degree to need this coefficient,
the intermediate coefficients are set to zero.value
- the new value of the coefficient.public void set(int n, int value)
n
- the zero-based index of the coefficient. n=0 for the constant term.
If the polynomial has not yet the degree to need this coefficient,
the intermediate coefficients are implicitly set to zero.value
- the new value of the coefficient.public int size()
public int degree()
public int ldegree()
public BigIntegerPoly multiply(java.math.BigInteger val)
val
- the factorpublic BigIntegerPoly multiply(BigIntegerPoly val)
val
- the other polynomialpublic BigIntegerPoly pow(int n) throws java.lang.ArithmeticException
n
- the exponent of the powerjava.lang.ArithmeticException
public BigIntegerPoly add(BigIntegerPoly val)
val
- the other polynomialpublic BigIntegerPoly subtract(BigIntegerPoly val)
val
- the other polynomialpublic BigIntegerPoly[] divideAndRemainder(BigIntegerPoly val)
val
- the other polynomialpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toPString()
protected void simplify()
public BigIntegerPoly derive()
public BigIntegerPoly trunc(int newdeg)
public BigIntegerPoly binomialTInv(int maxdeg)
maxdeg
- the maximum polynomial degree of the resultpublic int rootDeg(java.math.BigInteger r)
public java.util.Vector<java.math.BigInteger> iroots()
protected java.util.Vector<BigIntegerPoly> i2roots()
public boolean isZero()
public java.util.Vector<BigIntegerPoly> ifactor()