Class RealCsrMatrixMultiplication
java.lang.Object
org.flag4j.operations.sparse.csr.real.RealCsrMatrixMultiplication
This class provides low-level implementation of matrix multiplication between two real CSR matrices.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Matrix
Computes the matrix multiplication between two sparse CSR matrices.static CsrMatrix
standardAsSparse
(CsrMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.
-
Constructor Details
-
RealCsrMatrixMultiplication
private RealCsrMatrixMultiplication()
-
-
Method Details
-
standard
Computes the matrix multiplication between two sparse CSR matrices. The result is a dense matrix.- Parameters:
src1
- First CSR matrix in the multiplication.src2
- Second CSR matrix in the multiplication.- Returns:
- Entries of the dense matrix resulting from the matrix multiplication of the two sparse CSR matrices.
-
standardAsSparse
Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.
Warning: This method may be slower thanstandard(CsrMatrix, CsrMatrix)
if the result of multiplying this matrix withsrc2
is not very sparse. Further, multiplying two sparse matrices (even very sparse matrices) may result in a dense matrix so this method should be used with caution.- Parameters:
src1
- First CSR matrix in the multiplication.src2
- Second CSR matrix in the multiplication.- Returns:
- Sparse CSR matrix resulting from the matrix multiplication of the two sparse CSR matrices.
-