Class RealSparseMatrixProperties
java.lang.Object
org.flag4j.linalg.ops.sparse.coo.real.RealSparseMatrixProperties
This class contains low level implementations for methods to evaluate certain properties of a real sparse matrix.
(i.e. if the matrix is symmetric).
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAntiSymmetric
(Shape shape, double[] data, int[] rowIndices, int[] colIndices) Checks if a sparse COO matrix is symmetric.static boolean
Checks if a real sparse matrix is close to the identity matrix.static boolean
isIdentity
(CooMatrix src) Checks if a real sparse matrix is the identity matrix.static boolean
isSymmetric
(Shape shape, double[] data, int[] rowIndices, int[] colIndices) Checks if a sparse COO matrix is symmetric.
-
Method Details
-
isIdentity
Checks if a real sparse matrix is the identity matrix.- Parameters:
src
- Matrix to check if it is the identity matrix.- Returns:
true
if thesrc
matrix is the identity matrix;false
otherwise.
-
isCloseToIdentity
Checks if a real sparse matrix is close to the identity matrix.- Parameters:
src
- Matrix to check if it is the identity matrix.- Returns:
true
if thesrc
matrix is the identity matrix;false
otherwise.
-
isSymmetric
Checks if a sparse COO matrix is symmetric.- Parameters:
shape
- The shape of the COO matrix.data
- Non-zero entries of the COO matrix.rowIndices
- Non-zero row indices of the COO matrix.colIndices
- Non-zero column indices of the COO matrix.- Returns:
true
if the specified COO matrix is symmetric (i.e. equal to its transpose);false
otherwise.
-
isAntiSymmetric
public static boolean isAntiSymmetric(Shape shape, double[] data, int[] rowIndices, int[] colIndices) Checks if a sparse COO matrix is symmetric.- Parameters:
shape
- The shape of the COO matrix.data
- Non-zero entries of the COO matrix.rowIndices
- Non-zero row indices of the COO matrix.colIndices
- Non-zero column indices of the COO matrix.- Returns:
true
if the specified COO matrix is symmetric (i.e. equal to its transpose);false
otherwise.
-