Class SparseUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static boolean
CSREquals
(CsrCMatrix src1, CsrCMatrix src2) Checks if twoComplex CSR Matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.(package private) static boolean
Checks if twoCSR Matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.
-
Constructor Details
-
SparseUtils
private SparseUtils()
-
-
Method Details
-
CSREquals
Checks if two
CSR Matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.If zeros are explicitly stored at some position in only one matrix, it will be checked that the other matrix does not have a non-zero value at the same index. If it does, the matrices will not be equal. If no value is stored for that index then it is assumed to be zero by definition of the CSR format and the equality check continues with the remaining values.
- Parameters:
src1
- First CSR matrix in the equality comparison.src2
- Second CSR matrix in the equality comparison.- Returns:
- True if all non-zero values stored in the two matrices are equal and occur at the same indices.
-
CSREquals
Checks if two
Complex CSR Matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.If zeros are explicitly stored at some position in only one matrix, it will be checked that the other matrix does not have a non-zero value at the same index. If it does, the matrices will not be equal. If no value is stored for that index then it is assumed to be zero by definition of the CSR format and the equality check continues with the remaining values.
- Parameters:
src1
- First CSR matrix in the equality comparison.src2
- Second CSR matrix in the equality comparison.- Returns:
- True if all non-zero values stored in the two matrices are equal and occur at the same indices.
-