Class AbsoluteTolerance
- java.lang.Object
-
- dev.nm.misc.algorithm.iterative.tolerance.AbsoluteTolerance
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_TOLERANCEdefault 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 booleanisResidualSmall(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:ToleranceChecks if the updated residual satisfies the tolerance criteria.- Specified by:
isResidualSmallin interfaceTolerance- Parameters:
norm- the norm of the updated residual- Returns:
trueif the residual norm is small enough
-
-