public class RelativeTolerance extends java.lang.Object implements Tolerance
base is equal to or smaller than the specified
tolerance, that is,
||r||2/base ≤ tolerance
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_TOLERANCE
default tolerance
|
| Constructor and Description |
|---|
RelativeTolerance(double base)
Construct an instance with
DEFAULT_TOLERANCE. |
RelativeTolerance(double base,
double tolerance)
Construct an instance with specified
tolerance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isResidualSmall(double norm)
Checks if the updated residual satisfies the tolerance criteria.
|
public static final double DEFAULT_TOLERANCE
public RelativeTolerance(double base)
DEFAULT_TOLERANCE.base - the base value for computing the relative residualpublic RelativeTolerance(double base,
double tolerance)
tolerance.base - the base value for computing the relative residualtolerance - the residual norm criteriapublic boolean isResidualSmall(double norm)
ToleranceisResidualSmall in interface Tolerancenorm - the norm of the updated residualtrue if the residual norm is small enough