public class Monomial extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
Monomial.Analyser |
Modifier and Type | Field and Description |
---|---|
private BigInteger |
coefficient |
static Monomial |
ONE |
private ImmutableList<Term> |
parts |
Modifier | Constructor and Description |
---|---|
private |
Monomial(ImmutableList<Term> parts,
BigInteger coefficient) |
Modifier and Type | Method and Description |
---|---|
Monomial |
addToCoefficient(BigInteger c) |
private BigInteger |
cofactor(BigInteger v0,
BigInteger v1)
Extended euclidian algorithm for computing cofactors.
|
static Monomial |
create(Term monoTerm,
Services services) |
private static Monomial |
createHelp(Term monomial,
Services services) |
private static ImmutableList<Term> |
difference(ImmutableList<Term> a,
ImmutableList<Term> b) |
Monomial |
divideLCR(Monomial m) |
boolean |
divides(Monomial m) |
boolean |
equals(Object o) |
BigInteger |
getCoefficient() |
ImmutableList<Term> |
getParts() |
int |
hashCode() |
Monomial |
multiply(BigInteger c) |
Monomial |
multiply(Monomial m) |
Monomial |
reduce(Monomial m) |
boolean |
reducible(Monomial m) |
Monomial |
setCoefficient(BigInteger c) |
String |
toString() |
Term |
toTerm(Services services) |
boolean |
variablesAreCoprime(Monomial m) |
boolean |
variablesDisjoint(Monomial m) |
boolean |
variablesEqual(Monomial m) |
boolean |
variablesSubsume(Monomial m) |
private final ImmutableList<Term> parts
private final BigInteger coefficient
public static final Monomial ONE
private Monomial(ImmutableList<Term> parts, BigInteger coefficient)
public Monomial setCoefficient(BigInteger c)
public Monomial multiply(BigInteger c)
public Monomial addToCoefficient(BigInteger c)
public boolean divides(Monomial m)
this
divides the monomial
m
public boolean variablesSubsume(Monomial m)
this
subsume the
variables of m
, i.e., if each variable that
occurs in m
occurs in the same or a higher power
in this
public boolean variablesEqual(Monomial m)
public boolean variablesDisjoint(Monomial m)
public boolean reducible(Monomial m)
m
can be made smaller
(absolutely) by subtracting a multiple of this
public Monomial reduce(Monomial m)
m
by the
monomial this
public Monomial divideLCR(Monomial m)
m
and this
by the monomial
this
private BigInteger cofactor(BigInteger v0, BigInteger v1)
gcd(a,b)=a*cofactor(a,b)+b*cofactor(b,a)
private static ImmutableList<Term> difference(ImmutableList<Term> a, ImmutableList<Term> b)
a
but not in
b
. multiplicity is treated as well here, so this
is really difference of multisetspublic BigInteger getCoefficient()
public ImmutableList<Term> getParts()
public boolean variablesAreCoprime(Monomial m)