Class ComplexDenseSparseMatrixMultiplication
java.lang.Object
org.flag4j.operations.dense_sparse.coo.complex.ComplexDenseSparseMatrixMultiplication
This class provides low level methods for computing the matrix multiplication between
a sparse/dense matrix and dense/sparse matrix/vector.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CNumber[]
blockedVector
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a blocked algorithm.static CNumber[]
concurrentBlockedVector
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a blocked algorithm.static CNumber[]
concurrentStandard
(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.static CNumber[]
concurrentStandard
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] rowIndices, int[] colIndices, Shape shape2) Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a concurrent standard algorithm.static CNumber[]
concurrentStandardVector
(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.static CNumber[]
concurrentStandardVector
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.static CNumber[]
standard
(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the matrix multiplication between a complex sparse matrix and a complex dense matrix using a standard algorithm.static CNumber[]
standard
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] rowIndices, int[] colIndices, Shape shape2) Computes the matrix multiplication between a complex dense matrix and a complex sparse matrix using a standard algorithm.static CNumber[]
standardVector
(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the sparse matrix dense vector multiplication using a standard algorithm.static CNumber[]
standardVector
(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a standard algorithm.
-
Constructor Details
-
ComplexDenseSparseMatrixMultiplication
private ComplexDenseSparseMatrixMultiplication()
-
-
Method Details
-
standard
public static CNumber[] standard(CNumber[] src1, Shape shape1, CNumber[] src2, int[] rowIndices, int[] colIndices, Shape shape2) Computes the matrix multiplication between a complex dense matrix and a complex sparse matrix using a standard algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse matrix.rowIndices
- Row indices for non-zero entries of the sparse matrix.colIndices
- Column indices for non-zero entries of the sparse matrix.shape2
- Shape of the sparse matrix.- Returns:
- The result of the matrix multiplication.
-
standard
public static CNumber[] standard(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the matrix multiplication between a complex sparse matrix and a complex dense matrix using a standard algorithm.- Parameters:
src1
- Non-zero entries of the sparse matrix.rowIndices
- Row indices for non-zero entries of the sparse matrix.colIndices
- Column indices for non-zero entries of the sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense matrix.shape2
- Shape of the dense matrix.- Returns:
- The result of the matrix multiplication.
-
concurrentStandard
public static CNumber[] concurrentStandard(CNumber[] src1, Shape shape1, CNumber[] src2, int[] rowIndices, int[] colIndices, Shape shape2) Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a concurrent standard algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse matrix.rowIndices
- Row indices for non-zero entries of the sparse matrix.colIndices
- Column indices for non-zero entries of the sparse matrix.shape2
- Shape of the sparse matrix.- Returns:
- The result of the matrix multiplication.
-
concurrentStandard
public static CNumber[] concurrentStandard(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.- Parameters:
src1
- Non-zero entries of the sparse matrix.rowIndices
- Row indices for non-zero entries of the sparse matrix.colIndices
- Column indices for non-zero entries of the sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense matrix.shape2
- Shape of the dense matrix.- Returns:
- The result of the matrix multiplication.
-
standardVector
Computes the dense matrix sparse vector multiplication using a standard algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse vector.indices
- Indices of non-zero entries in sparse vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-
standardVector
public static CNumber[] standardVector(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the sparse matrix dense vector multiplication using a standard algorithm.- Parameters:
src1
- Entries of the sparse matrix.rowIndices
- Row indices of non-zero entries in sparse matrix.colIndices
- Column indices of non-zero entries in sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense vector.shape2
- Shape of the dense vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-
blockedVector
Computes the dense matrix sparse vector multiplication using a blocked algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse vector.indices
- Indices of non-zero entries in sparse vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-
concurrentStandardVector
public static CNumber[] concurrentStandardVector(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse vector.indices
- Indices of non-zero entries in sparse vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-
concurrentStandardVector
public static CNumber[] concurrentStandardVector(CNumber[] src1, int[] rowIndices, int[] colIndices, Shape shape1, CNumber[] src2, Shape shape2) Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.- Parameters:
src1
- Entries of the sparse matrix.rowIndices
- Row indices of non-zero entries in sparse matrix.colIndices
- Column indices of non-zero entries in sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense vector.shape2
- Shape of the dense vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-
concurrentBlockedVector
public static CNumber[] concurrentBlockedVector(CNumber[] src1, Shape shape1, CNumber[] src2, int[] indices) Computes the dense matrix sparse vector multiplication using a blocked algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero entries of the sparse vector.indices
- Indices of non-zero entries in sparse vector.- Returns:
- Entries of the dense matrix resulting from the matrix vector multiplication.
-