public class Polynomial
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Polynomial.Analyser |
Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
constantPart |
private static java.math.BigInteger |
MINUS_ONE |
static Polynomial |
ONE |
private ImmutableList<Monomial> |
parts |
static Polynomial |
ZERO |
Modifier | Constructor and Description |
---|---|
private |
Polynomial(ImmutableList<Monomial> parts,
java.math.BigInteger constantPart) |
private final java.math.BigInteger constantPart
private final ImmutableList<Monomial> parts
private static final java.math.BigInteger MINUS_ONE
public static final Polynomial ZERO
public static final Polynomial ONE
private Polynomial(ImmutableList<Monomial> parts, java.math.BigInteger constantPart)
public static Polynomial create(Term polyTerm, Services services)
private static Polynomial createHelp(Term polynomial, Services services)
public Polynomial multiply(java.math.BigInteger c)
public Polynomial multiply(Monomial m)
public Polynomial add(java.math.BigInteger c)
public Polynomial sub(Polynomial p)
public Polynomial add(Monomial m)
public Polynomial add(Polynomial p)
public java.math.BigInteger coeffGcd()
BigInteger.ZERO
public boolean valueLess(Polynomial p)
true
if the value of this
will
always be less than the value of p
(i.e., same monomials, but the constant part is less or equal)public boolean valueEq(Polynomial p)
true
if the value of this
will
always be equal to the value of p
(i.e., same monomials and same constant part)public boolean valueUneq(Polynomial p)
public boolean valueEq(java.math.BigInteger c)
public boolean valueUneq(java.math.BigInteger c)
public boolean valueLeq(Polynomial p)
true
if the value of this
will
always be less or equal than the value of p
(i.e., same monomials, but the constant part is less or equal)public boolean valueLess(java.math.BigInteger c)
public boolean valueGeq(java.math.BigInteger c)
public boolean sameParts(Polynomial p)
public java.lang.String toString()
toString
in class java.lang.Object
private static ImmutableList<Monomial> difference(ImmutableList<Monomial> a, ImmutableList<Monomial> b)
a
but not
in b
. multiplicity is treated as well here, so
this is really difference of multisetsprivate static ImmutableList<Monomial> addPart(ImmutableList<Monomial> oldParts, Monomial m)
private static ImmutableList<Monomial> addPartHelp(ImmutableList<Monomial> oldParts, Monomial m)
public java.math.BigInteger getConstantTerm()
public ImmutableList<Monomial> getParts()