public class MatrixFeatures_ZDRM
extends java.lang.Object
Functions for computing the features of complex matrices
Constructor and Description |
---|
MatrixFeatures_ZDRM() |
Modifier and Type | Method and Description |
---|---|
static boolean |
hasNaN(org.ejml.data.ZMatrixD1 m)
Checks to see if any element in the matrix is NaN.
|
static boolean |
hasUncountable(org.ejml.data.ZMatrixD1 m)
Checks to see if any element in the matrix is NaN of Infinite.
|
static boolean |
isEquals(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b)
Checks to see if each element in the two matrices are equal:
aij == bij
|
static boolean |
isEquals(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b,
double tol)
Checks to see if each element in the two matrices are within tolerance of
each other: tol ≥ |aij - bij|.
|
static boolean |
isHermitian(org.ejml.data.ZMatrixRMaj Q,
double tol)
Hermitian matrix is a square matrix with complex entries that are equal to its own conjugate transpose.
|
static boolean |
isIdentical(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b,
double tol)
Checks to see if each corresponding element in the two matrices are
within tolerance of each other or have the some symbolic meaning.
|
static boolean |
isIdentity(org.ejml.data.ZMatrix mat,
double tol)
Checks to see if the provided matrix is within tolerance to an identity matrix.
|
static boolean |
isLowerTriangle(org.ejml.data.ZMatrixRMaj A,
int hessenberg,
double tol)
Checks to see if a matrix is lower triangular or Hessenberg.
|
static boolean |
isNegative(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b,
double tol)
Checks to see if the two matrices are the negative of each other:
aij = -bij |
static boolean |
isPositiveDefinite(org.ejml.data.ZMatrixRMaj A)
Checks to see if the matrix is positive definite.
|
static boolean |
isUnitary(org.ejml.data.ZMatrixRMaj Q,
double tol)
Unitary matrices have the following properties:
Q*QH = I |
static boolean |
isUpperTriangle(org.ejml.data.ZMatrixRMaj A,
int hessenberg,
double tol)
Checks to see if a matrix is upper triangular or Hessenberg.
|
static boolean |
isVector(org.ejml.data.Matrix mat)
Checks to see if the matrix is a vector or not.
|
static boolean |
isZeros(org.ejml.data.ZMatrixD1 m,
double tol)
Checks to see all the elements in the matrix are zeros
|
public static boolean isVector(org.ejml.data.Matrix mat)
mat
- A matrix. Not modified.public static boolean isNegative(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b, double tol)
Checks to see if the two matrices are the negative of each other:
aij = -bij
a
- First matrix. Not modified.b
- Second matrix. Not modified.tol
- Numerical tolerance.public static boolean hasNaN(org.ejml.data.ZMatrixD1 m)
m
- A matrix. Not modified.public static boolean hasUncountable(org.ejml.data.ZMatrixD1 m)
m
- A matrix. Not modified.public static boolean isEquals(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b)
Checks to see if each element in the two matrices are equal: aij == bij
NOTE: If any of the elements are NaN then false is returned. If two corresponding elements are both positive or negative infinity then they are equal.
a
- A matrix. Not modified.b
- A matrix. Not modified.public static boolean isEquals(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b, double tol)
Checks to see if each element in the two matrices are within tolerance of each other: tol ≥ |aij - bij|.
NOTE: If any of the elements are not countable then false is returned.
NOTE: If a tolerance of zero is passed in this is equivalent to calling
isEquals(ZMatrixD1, ZMatrixD1)
a
- A matrix. Not modified.b
- A matrix. Not modified.tol
- How close to being identical each element needs to be.public static boolean isIdentical(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b, double tol)
Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning. This can handle NaN and Infinite numbers.
If both elements are countable then the following equality test is used:
|aij - bij| ≤ tol.
Otherwise both numbers must both be Double.NaN, Double.POSITIVE_INFINITY, or
Double.NEGATIVE_INFINITY to be identical.
a
- A matrix. Not modified.b
- A matrix. Not modified.tol
- Tolerance for equality.public static boolean isIdentity(org.ejml.data.ZMatrix mat, double tol)
mat
- Matrix being examined. Not modified.tol
- Tolerance.public static boolean isHermitian(org.ejml.data.ZMatrixRMaj Q, double tol)
Hermitian matrix is a square matrix with complex entries that are equal to its own conjugate transpose.
a[i,j] = conj(a[j,i])
Q
- The matrix being tested. Not modified.tol
- Tolerance.public static boolean isUnitary(org.ejml.data.ZMatrixRMaj Q, double tol)
Unitary matrices have the following properties:
Q*QH = I
This is the complex equivalent of orthogonal matrix.
Q
- The matrix being tested. Not modified.tol
- Tolerance.public static boolean isPositiveDefinite(org.ejml.data.ZMatrixRMaj A)
Checks to see if the matrix is positive definite.
xT A x > 0
for all x where x is a non-zero vector and A is a hermitian matrix.
A
- square hermitian matrix. Not modified.public static boolean isUpperTriangle(org.ejml.data.ZMatrixRMaj A, int hessenberg, double tol)
Checks to see if a matrix is upper triangular or Hessenberg. A Hessenberg matrix of degree N
has the following property:
aij ≤ 0 for all i < j+N
A triangular matrix is a Hessenberg matrix of degree 0.
A
- Matrix being tested. Not modified.hessenberg
- The degree of being hessenberg.tol
- How close to zero the lower left elements need to be.public static boolean isLowerTriangle(org.ejml.data.ZMatrixRMaj A, int hessenberg, double tol)
Checks to see if a matrix is lower triangular or Hessenberg. A Hessenberg matrix of degree N
has the following property:
aij ≤ 0 for all i < j+N
A triangular matrix is a Hessenberg matrix of degree 0.
A
- Matrix being tested. Not modified.hessenberg
- The degree of being hessenberg.tol
- How close to zero the lower left elements need to be.public static boolean isZeros(org.ejml.data.ZMatrixD1 m, double tol)
m
- A matrix. Not modified.