|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.AbstractPolynomial<V>
sbrt.kernel.math.AbstractLinearComb<V>
V
- the variable type.public abstract class AbstractLinearComb<V>
This abstract class is a skeleton implementation of LinearComb.
Nested Class Summary | |
---|---|
static class |
AbstractLinearComb.Term<V>
This class is a skeleton implementation of LinearComb.Term. |
Constructor Summary | |
---|---|
AbstractLinearComb(double constant)
Constructs a new linear combination with the provided constant. |
|
AbstractLinearComb(double constant,
double zeroCutoff)
Constructs a new linear combination with the provided constant and zero cutoff. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates if the provided object is equal to this linear combination. |
java.util.List<LinearComb.Term<V>> |
getTermList()
Returns the terms of this linear combination as list. |
double |
getZeroCutoff()
Returns the current zero cutoff. |
java.util.Iterator<LinearComb.Term<V>> |
iterator()
Returns an iterator over the terms of this linear combination. |
Methods inherited from class sbrt.kernel.math.AbstractPolynomial |
---|
checkConstant, getConstant, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sbrt.kernel.math.LinearComb |
---|
add, add, getCoefficient, getTermArray, hashCode, multiply, plugIn, plugIn, plugIn, plugIn, plugInNumbers, solveFor, toString |
Methods inherited from interface sbrt.kernel.math.Polynomial |
---|
getConstant, terms |
Methods inherited from interface sbrt.kernel.math.MathExpr |
---|
getVariables, hasAllVariables, hasVariable, hasVariables, variables |
Constructor Detail |
---|
public AbstractLinearComb(double constant, double zeroCutoff)
constant
- the constant of this linear combination.zeroCutoff
- the value used to decide if coefficients or constants
are close enough to zero to be considered equal to zero.
java.lang.IllegalArgumentException
- if a provided value is either
infinite or NaN; or if the zero cutoff is negative.getZeroCutoff()
public AbstractLinearComb(double constant)
constant
- the constant of this linear combination.Method Detail |
---|
public double getZeroCutoff()
The zero cutoff is a value used to decide if coefficients are close enough to zero to be considered equal to zero. In other words, the absolute value of the coefficient of every term of this linear combination will be greater than the zero cutoff.
getZeroCutoff
in interface LinearComb<V>
public java.util.List<LinearComb.Term<V>> getTermList()
getTermList
in interface LinearComb<V>
public java.util.Iterator<LinearComb.Term<V>> iterator()
iterator
in interface java.lang.Iterable<LinearComb.Term<V>>
iterator
in interface LinearComb<V>
public boolean equals(java.lang.Object obj)
For two linear combinations to be equal, they must contain the same numerical constant and terms.
equals
in interface LinearComb<V>
equals
in interface MathExpr<V>
equals
in interface Polynomial<V>
equals
in class java.lang.Object
obj
- the object to be tested for equality with
this linear combination.
true
if this linear combination equals the provided
object; false
otherwise.AbstractLinearComb.Term.equals(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |