Class RealComplexCsrMatrixMultiplication
java.lang.Object
org.flag4j.operations.sparse.csr.real_complex.RealComplexCsrMatrixMultiplication
This class provides low-level implementation of matrix multiplication between a real CSR matrix and a complex
CSR matrix.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CMatrix
standard
(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CMatrix
standard
(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CsrCMatrix
standardAsSparse
(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CsrCMatrix
standardAsSparse
(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CVector
standardVector
(CsrCMatrix src1, CooVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.static CVector
standardVector
(CsrMatrix src1, CooCVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.
-
Constructor Details
-
RealComplexCsrMatrixMultiplication
private RealComplexCsrMatrixMultiplication()
-
-
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.
-
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, CsrCMatrix)
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.
-
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(CsrCMatrix, 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.
-
standardVector
Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.- Parameters:
src1
- The matrix in the multiplication.src2
- Vector in multiplication. Treated as a column vector in COO format.- Returns:
- The result of the matrix-vector multiplication.
- Throws:
IllegalArgumentException
- If the number of columns insrc1
does not equal the number of columns insrc2
.
-
standardVector
Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.- Parameters:
src1
- The matrix in the multiplication.src2
- Vector in multiplication. Treated as a column vector in COO format.- Returns:
- The result of the matrix-vector multiplication.
- Throws:
IllegalArgumentException
- If the number of columns insrc1
does not equal the number of columns insrc2
.
-