Class RealDenseProperties
java.lang.Object
org.flag4j.linalg.ops.dense.real.RealDenseProperties
This class contains low-level implementations for ops which check if a tensor satisfies some property.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAntiSymmetric(double[] src, Shape shape) Checks if a real dense matrix is anti-symmetric.static booleanisCloseToIdentity(Matrix src) Checks if a matrix is the identity matrix approximately.static booleanisIdentity(Matrix src) Checks if a matrix is the identity matrix exactly.static booleanisSymmetric(double[] src, Shape shape) Checks if a real dense matrix is symmetric.
-
Method Details
-
isSymmetric
Checks if a real dense matrix is symmetric. That is, if the matrix is equal to its transpose.- Parameters:
src- Entries of the matrix.shape- Shape of the matrix.- Returns:
- True if this matrix is symmetric
-
isAntiSymmetric
Checks if a real dense matrix is anti-symmetric. That is, if the matrix is equal to its negative transpose.- Parameters:
src- Entries of the matrix.shape- Shape of the matrix.- Returns:
- True if this matrix is anti-symmetric
-
isIdentity
Checks if a matrix is the identity matrix exactly.- Parameters:
src- Matrix of interest to check if it is the identity matrix.- Returns:
- True if the
srcmatrix is exactly the identity matrix.
-
isCloseToIdentity
Checks if a matrix is the identity matrix approximately. Specifically, if the diagonal data are no farther than 1.001E-5 in absolute value from 1.0 and the non-diagonal data are no larger than 1e-08 in absolute value. These tolerances are derived from themethod.invalid reference
TensorBase#allClose(Object)- Parameters:
src- Matrix of interest to check if it is the identity matrix.- Returns:
- True if the
srcmatrix is exactly the identity matrix.
-