Class ComplexDenseProperties
java.lang.Object
org.flag4j.operations.dense.complex.ComplexDenseProperties
This class contains low-level implementations for operations which check if a complex tensor satisfies some property.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAntiHermitian
(CNumber[] src, Shape shape) Checks if a real dense matrix is anti-hermitian.static boolean
isCloseToIdentity
(CMatrix src) Checks if a matrix is the identity matrix approximately.static boolean
isHermitian
(CNumber[] src, Shape shape) Checks if a complex dense matrix is hermitian.static boolean
Checks if this tensor only contains ones.
-
Constructor Details
-
ComplexDenseProperties
private ComplexDenseProperties()
-
-
Method Details
-
isOnes
Checks if this tensor only contains ones.- Parameters:
src
- Elements of the tensor.- Returns:
- True if this tensor only contains ones. Otherwise, returns false.
-
isHermitian
Checks if a complex dense matrix is hermitian. That is, if the and equal to its conjugate transpose.- Parameters:
src
- Entries of the matrix.shape
- Shape of the matrix.- Returns:
- True if this matrix is hermitian. Otherwise, returns false.
-
isAntiHermitian
Checks if a real dense matrix is anti-hermitian. That is, if the and equal to its negative conjugate transpose.- Parameters:
src
- Entries of the matrix.shape
- Shape of the matrix.- Returns:
- True if this matrix is anti-hermitian. Otherwise, returns false.
-
isCloseToIdentity
Checks if a matrix is the identity matrix approximately. Specifically, if the diagonal entries are no farther than 1.001E-5 in absolute value from 1.0 and the non-diagonal entries are no larger than 1e-08 in absolute value. These tolerances are derived from theTensorBase.allClose(Object)
method.- Parameters:
src
- Matrix of interest to check if it is the identity matrix.- Returns:
- True if the
src
matrix is exactly the identity matrix.
-