Class AbsoluteTolerance
- java.lang.Object
-
- dev.nm.misc.algorithm.iterative.tolerance.AbsoluteTolerance
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_TOLERANCE
default tolerance
-
Constructor Summary
Constructors Constructor Description AbsoluteTolerance()
Construct an instance withDEFAULT_TOLERANCE
.AbsoluteTolerance(double tolerance)
Construct an instance with specifiedtolerance
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isResidualSmall(double norm)
Checks if the updated residual satisfies the tolerance criteria.
-
-
-
Field Detail
-
DEFAULT_TOLERANCE
public static final double DEFAULT_TOLERANCE
default tolerance- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbsoluteTolerance
public AbsoluteTolerance()
Construct an instance withDEFAULT_TOLERANCE
.
-
AbsoluteTolerance
public AbsoluteTolerance(double tolerance)
Construct an instance with specifiedtolerance
.- Parameters:
tolerance
- the residual norm criteria
-
-
Method Detail
-
isResidualSmall
public boolean isResidualSmall(double norm)
Description copied from interface:Tolerance
Checks if the updated residual satisfies the tolerance criteria.- Specified by:
isResidualSmall
in interfaceTolerance
- Parameters:
norm
- the norm of the updated residual- Returns:
true
if the residual norm is small enough
-
-