Class DefaultDeflationCriterion
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.factorization.eigen.qr.DefaultDeflationCriterion
-
- All Implemented Interfaces:
DeflationCriterion
public class DefaultDeflationCriterion extends Object implements DeflationCriterion
The default deflation criterion is to use eq. 7.5.2 in Golub and van Loan: H[i,j] is negligible when| H[i,j] | < tol * (| H[i-1,j] | + | H[i,j+1] |)
or, when| H[i-1,j] | + | H[i,j+1] | == 0
and to use eq. 2.2 in Matrix Algorithms, Volume II by Steward G. W.| H[i,j] | < tol * ||A||F
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DefaultDeflationCriterion.MatrixNorm
Computes the norm of a given matrix.
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_THRESHOLD
The default tolerance parameter tol.
-
Constructor Summary
Constructors Constructor Description DefaultDeflationCriterion()
Constructs the default deflation criterion.DefaultDeflationCriterion(double threshold)
Constructs the default deflation criterion.DefaultDeflationCriterion(double threshold, DefaultDeflationCriterion.MatrixNorm matrixNorm)
Constructs the default deflation criterion, with the algorithm for computing matrix norm for the matrix argument inisNegligible()
.DefaultDeflationCriterion(DefaultDeflationCriterion.MatrixNorm matrixNorm)
Constructs the default deflation criterion, with the algorithm for computing matrix norm for the matrix argument inisNegligible()
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isNegligible(Matrix H, int i, int j, double epsilon)
Checks ifH[i,j]
is negligible by Steward's deflation criterion.
-
-
-
Field Detail
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
The default tolerance parameter tol.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultDeflationCriterion
public DefaultDeflationCriterion()
Constructs the default deflation criterion.
-
DefaultDeflationCriterion
public DefaultDeflationCriterion(double threshold)
Constructs the default deflation criterion.- Parameters:
threshold
- the tolerance in Steward's deflation criterion
-
DefaultDeflationCriterion
public DefaultDeflationCriterion(DefaultDeflationCriterion.MatrixNorm matrixNorm)
Constructs the default deflation criterion, with the algorithm for computing matrix norm for the matrix argument inisNegligible()
. Note: for special types of matrices, a fast implementation of matrix norm can speed up the whole process.- Parameters:
matrixNorm
- the matrix norm algorithm
-
DefaultDeflationCriterion
public DefaultDeflationCriterion(double threshold, DefaultDeflationCriterion.MatrixNorm matrixNorm)
Constructs the default deflation criterion, with the algorithm for computing matrix norm for the matrix argument inisNegligible()
. Note: for special types of matrices, a fast implementation of matrix norm can speed up the whole process.- Parameters:
threshold
- the tolerance in Steward's deflation criterionmatrixNorm
- the matrix norm algorithm
-
-
Method Detail
-
isNegligible
public boolean isNegligible(Matrix H, int i, int j, double epsilon)
Checks ifH[i,j]
is negligible by Steward's deflation criterion.- Specified by:
isNegligible
in interfaceDeflationCriterion
- Parameters:
H
- a matrixi
- a row indexj
- a column indexepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0- Returns:
true
if| H[i,j] | < tol * (| H[i-1,j] | + | H[i,j+1] |)
-
-