public class Polynomial extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
Polynomial.Analyser |
Modifier and Type | Field and Description |
---|---|
private BigInteger |
constantPart |
private static BigInteger |
MINUS_ONE |
static Polynomial |
ONE |
private ImmutableList<Monomial> |
parts |
static Polynomial |
ZERO |
Modifier | Constructor and Description |
---|---|
private |
Polynomial(ImmutableList<Monomial> parts,
BigInteger constantPart) |
private final BigInteger constantPart
private final ImmutableList<Monomial> parts
private static final BigInteger MINUS_ONE
public static final Polynomial ZERO
public static final Polynomial ONE
private Polynomial(ImmutableList<Monomial> parts, BigInteger constantPart)
public static Polynomial create(Term polyTerm, Services services)
private static Polynomial createHelp(Term polynomial, Services services)
public Polynomial multiply(BigInteger c)
public Polynomial multiply(Monomial m)
public Polynomial add(BigInteger c)
public Polynomial sub(Polynomial p)
public Polynomial add(Monomial m)
public Polynomial add(Polynomial p)
public 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(BigInteger c)
public boolean valueUneq(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(BigInteger c)
public boolean valueGeq(BigInteger c)
public boolean sameParts(Polynomial p)
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 BigInteger getConstantTerm()
public ImmutableList<Monomial> getParts()