Class RealComplexSparseMatrixMultiplication
java.lang.Object
org.flag4j.linalg.ops.sparse.coo.real_complex.RealComplexSparseMatrixMultiplication
This class contains low level methods for computing the multiplication between a real/complex matrix and a complex/real
matrix/vector.
WARNING: The methods in this class do not provide sanity checks.
WARNING: The methods in this class do not provide sanity checks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Complex128[]
concurrentStandard
(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.static Complex128[]
concurrentStandard
(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.static Complex128[]
concurrentStandardVector
(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.static Complex128[]
concurrentStandardVector
(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.static Complex128[]
standard
(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a standard algorithm.static Complex128[]
standard
(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a standard algorithm.static Complex128[]
standardVector
(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.static Complex128[]
standardVector
(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.
-
Method Details
-
standard
public static Complex128[] standard(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.rowIndices2
- Row indices of non-zero data for the second sparse matrix.colIndices2
- column indices of non-zero data for the second sparse matrix.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix multiplication stored in a dense matrix.
-
concurrentStandard
public static Complex128[] concurrentStandard(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.rowIndices2
- Row indices of non-zero data for the second sparse matrix.colIndices2
- column indices of non-zero data for the second sparse matrix.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix multiplication stored in a dense matrix.
-
standardVector
public static Complex128[] standardVector(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.indices
- Indices of non-zero data in the sparse vector.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix-vector multiplication stored in a dense matrix.
-
concurrentStandardVector
public static Complex128[] concurrentStandardVector(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.indices
- Indices of non-zero data in the sparse vector.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix-vector multiplication stored in a dense matrix.
-
standard
public static Complex128[] standard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.rowIndices2
- Row indices of non-zero data for the second sparse matrix.colIndices2
- column indices of non-zero data for the second sparse matrix.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix multiplication stored in a dense matrix.
-
concurrentStandard
public static Complex128[] concurrentStandard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.rowIndices2
- Row indices of non-zero data for the second sparse matrix.colIndices2
- column indices of non-zero data for the second sparse matrix.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix multiplication stored in a dense matrix.
-
standardVector
public static Complex128[] standardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.indices
- Indices of non-zero data in the sparse vector.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix-vector multiplication stored in a dense matrix.
-
concurrentStandardVector
public static Complex128[] concurrentStandardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.- Parameters:
src1
- Non-zero data of the first sparse matrix.rowIndices1
- Row indices of non-zero data for the first sparse matrix.colIndices1
- Column indices of non-zero data for the first sparse matrix.shape1
- Shape of the first sparse matrix.src2
- Non-zero data of the second sparse matrix.indices
- Indices of non-zero data in the sparse vector.shape2
- Shape of the second sparse matrix.- Returns:
- The result of the matrix-vector multiplication stored in a dense matrix.
-