public class Monomial
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Monomial.Analyser |
Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
coefficient |
static Monomial |
ONE |
private ImmutableList<Term> |
parts |
Modifier | Constructor and Description |
---|---|
private |
Monomial(ImmutableList<Term> parts,
java.math.BigInteger coefficient) |
Modifier and Type | Method and Description |
---|---|
Monomial |
addToCoefficient(java.math.BigInteger c) |
private java.math.BigInteger |
cofactor(java.math.BigInteger v0,
java.math.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(java.lang.Object o) |
java.math.BigInteger |
getCoefficient() |
ImmutableList<Term> |
getParts() |
int |
hashCode() |
Monomial |
multiply(java.math.BigInteger c) |
Monomial |
multiply(Monomial m) |
Monomial |
reduce(Monomial m) |
boolean |
reducible(Monomial m) |
Monomial |
setCoefficient(java.math.BigInteger c) |
java.lang.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 java.math.BigInteger coefficient
public static final Monomial ONE
private Monomial(ImmutableList<Term> parts, java.math.BigInteger coefficient)
public Monomial setCoefficient(java.math.BigInteger c)
public Monomial multiply(java.math.BigInteger c)
public Monomial addToCoefficient(java.math.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 java.math.BigInteger cofactor(java.math.BigInteger v0, java.math.BigInteger v1)
gcd(a,b)=a*cofactor(a,b)+b*cofactor(b,a)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
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 java.math.BigInteger getCoefficient()
public ImmutableList<Term> getParts()
public boolean variablesAreCoprime(Monomial m)