Multiple two linear combinations.
Multiple two linear combinations. One of the arguments has to be
constant, otherwise the method will raise an
IllegalArgumentException
.
Addition of two linear combinations.
Addition of two linear combinations. The result is sorted with the same
TermOrder
as this
Add an integer literal to a LinearCombination
.
Add an integer literal to a LinearCombination
. The result is
sorted with the same TermOrder
as this
Subtraction of two linear combinations.
Subtraction of two linear combinations. The result is sorted with the same
TermOrder
as this
Divide all coefficients of this linear combination by a constant, rounding downwards
Divide all coefficients of this linear combination by a constant, rounding downwards
Iterator over all coefficients of the linear combination
Iterator over all coefficients of the linear combination
The constant term of this linear combination (zero if there is no constant term)
The constant term of this linear combination (zero if there is no constant term)
Return Some(d)
if the difference between this
and
that
is only an integer constant d
(this = that + d
), and None
otherwise.
Return Some(d)
if the difference between this
and
that
is only an integer constant d
(this = that + d
), and None
otherwise.
Determine the coefficient of a certain term in this linear combination, or zero if the term does not occur.
Determine the coefficient of a certain term in this linear combination, or zero if the term does not occur. This is done by binary search
Method to access the coefficients of the linear combination
Method to access the coefficients of the linear combination
Method to access the terms of the linear combination
Method to access the terms of the linear combination
Return whether the this
and
that
agree on the non-constant terms, but with
inverted sign.
Return whether the this
and
that
agree on the non-constant terms, but with
inverted sign. I.e., whether
the sum of this
and
that
is some integer constant d
(this + that = d
).
Return whether this linear combination is an integer constant
Return whether this linear combination is an integer constant
Return whether the value of this linear combination is never zero
Return whether the value of this linear combination is never zero
A linear combination is called positive if it is not constantly zero and if the leading coefficient is positive
A linear combination is called positive if it is not constantly zero and if the leading coefficient is positive
A linear combination is called primitive if it is not constantly zero and if the coefficients of non-constant terms are coprime.
A linear combination is called primitive if it is not constantly zero and if the coefficients of non-constant terms are coprime.
Return whether the value of this linear combination is constantly zero
Return whether the value of this linear combination is constantly zero
The leading coefficient of this linear combination
The leading coefficient of this linear combination
The leading monomial of this linear combination
The leading monomial of this linear combination
Divide the linear combination by nonConstCoeffGcd
such that
it becomes primitive (isPrimitive
).
Divide the linear combination by nonConstCoeffGcd
such that
it becomes primitive (isPrimitive
). If isNonZero
,
the constant term will be rounded downwards.
Divide the linear combination by nonConstCoeffGcd
such that
it becomes primitive (isPrimitive
), and possibly change the
sign so that the linear combination becomes positive
(isPositive
)
Divide the linear combination by nonConstCoeffGcd
such that
it becomes primitive (isPrimitive
), and possibly change the
sign so that the linear combination becomes positive
(isPositive
)
Reduce all coefficients but the coefficient of the leading term
of this
with
IdealInt.reduceAbs(this.leadingCoeff)
and return the
remainder.
Reduce all coefficients but the coefficient of the leading term
of this
with
IdealInt.reduceAbs(this.leadingCoeff)
and return the
remainder. This is used for simplifying divisibility constraints.
The gcd of the coefficients of non-constant terms in the linear combination
The gcd of the coefficients of non-constant terms in the linear combination
Reduce all coefficients of this
with
IdealInt.reduceAbs(this.leadingCoeff)
and return the quotient.
Reduce all coefficients of this
with
IdealInt.reduceAbs(this.leadingCoeff)
and return the quotient.
This is used for column operations when solving systems of
linear equations.
Return whether the this
and
that
agree on the non-constant terms.
Return whether the this
and
that
agree on the non-constant terms. I.e., whether
the difference between this
and
that
is only some integer constant d
(this = that + d
).
Multiply all coefficients of this linear combination by a constant
Multiply all coefficients of this linear combination by a constant
Multiply all coefficients of this linear combination by a constant, and add some constant term
Multiply all coefficients of this linear combination by a constant, and add some constant term
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Re-sort an object with a new TermOrder
.
Re-sort an object with a new TermOrder
. It is guaranteed that
the result isSortedBy(order)
Iterator over all terms of the linear combination
Iterator over all terms of the linear combination
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
The negation of a linear combination
The negation of a linear combination
(Since version ) see corresponding Javadoc for more information.
General implementation of linear combinations, with an unbounded number of terms