Class PositiveDefiniteness
java.lang.Object
org.flag4j.linalg.PositiveDefiniteness
Utility class for checking the positive-(semi-)definiteness of a real or complex matrix.
A matrix \( M \) is positive-definite iff \( \Re\left[x^{H}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.
In the case where \( M \) is real, this simplifies to \( x^{T}Mx > 0 \).
Similarly, a matrix \( M \) is positive-semi-definite iff \( \Re\left[x^{H}Mx\right] >= 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and greater than or equal to than zero.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isHermPosDef
(CMatrix src) Checks if the matrix is Hermitian positive-definite.static boolean
Checks if the matrix is positive-definite.static boolean
Checks if the matrix is positive-definite.static boolean
isPosSemiDef
(CMatrix src) Checks if the matrix is positive semi-definite.static boolean
isPosSemiDef
(Matrix src) Checks if the matrix is positive semi-definite.static boolean
isSymmPosDef
(Matrix src) Checks if the matrix is symmetric positive-definite.
-
Method Details
-
isPosDef
Checks if the matrix is positive-definite. A matrix \( M \) is positive-definite iff \( x^{T}Mx > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are strictly greater than zero.- Parameters:
src
- Matrix to check if it is positive-definite.- Returns:
true
if the matrix is positive-definite;false
otherwise.- See Also:
-
isPosDef
Checks if the matrix is positive-definite. A matrix \( M \) is positive-definite iff \( \Re\left[x^{T}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are strictly greater than zero.- Parameters:
src
- Matrix to check if it is positive-definite.- Returns:
true
if the matrix is positive-definite;false
otherwise.- See Also:
-
isSymmPosDef
Checks if the matrix is symmetric positive-definite. A matrix \( M \) is symmetric positive-definite iff the matrix is symmetric and \( x^{H}Mx > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.- Parameters:
src
- Matrix to check if it is positive-definite.- Returns:
true
if the matrix is positive-definite;false
otherwise.- See Also:
-
isHermPosDef
Checks if the matrix is Hermitian positive-definite. A matrix \( M \) is Hermitian positive-definite iff the matrix is Hermitian and \( \Re\left[x^{H}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.- Parameters:
src
- Matrix to check if it is positive-definite.- Returns:
true
if the matrix is positive-definite;false
otherwise.- See Also:
-
isPosSemiDef
Checks if the matrix is positive semi-definite. A matrix \( M \) is positive-semi-definite iff \( x^{T}Mx >= 0 \) for any vector \( x \), or equivalently, if all eigenvalues are greater than or equal to zero.- Parameters:
src
- Matrix to check if it is positive semi-definite.- Returns:
true
if the matrix is positive semi-definite;false
otherwise.- See Also:
-
isPosSemiDef
Checks if the matrix is positive semi-definite. A matrix \( M \) is positive-semi-definite iff \( \Re\left[x^{T}Mx\right] >= 0 \) for any vector \( x \), or equivalently, if all eigenvalues are greater than or equal to zero.- Parameters:
src
- Matrix to check if it is positive semi-definite.- Returns:
true
if the matrix is positive semi-definite;false
otherwise.- See Also:
-