Class DenseCooFieldMatMult
java.lang.Object
org.flag4j.linalg.ops.dense_sparse.coo.field_ops.DenseCooFieldMatMult
This utility class provides low level methods for computing the matrix multiplication between
a sparse/dense matrix and dense/sparse matrix/vector.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidblockedVector
(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the dense matrix sparse vector multiplication using a blocked algorithm.static <T extends Field<T>>
voidconcurrentBlockedVector
(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the dense matrix sparse vector multiplication using a blocked algorithm.static <T extends Field<T>>
voidconcurrentStandard
(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.static <T extends Field<T>>
voidconcurrentStandard
(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest) Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a concurrent standard algorithm.static <T extends Field<T>>
voidconcurrentStandardVector
(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.static <T extends Field<T>>
voidconcurrentStandardVector
(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.static <T extends Field<T>>
voidstandard
(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between a sparse COO matrix and a dense matrix using a standard algorithm.static <T extends Field<T>>
voidstandard
(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest) Computes the matrix multiplication between a dense matrix and a sparse COO matrix using a standard algorithm.static <T extends Field<T>>
voidstandardVector
(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the sparse matrix dense vector multiplication using a standard algorithm.static <T extends Field<T>>
voidstandardVector
(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the dense matrix sparse vector multiplication using a standard algorithm.
-
Method Details
-
standard
public static <T extends Field<T>> void standard(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest) Computes the matrix multiplication between a dense matrix and a sparse COO matrix using a standard algorithm.- Parameters:
src1
- Entries of the dense matrix.shape1
- Shape of the dense matrix.src2
- Non-zero data of the sparse matrix.rowIndices
- Row indices for non-zero data of the sparse matrix.colIndices
- Column indices for non-zero data of the sparse matrix.shape2
- Shape of the sparse matrix.dest
- Array to store the dense result of the matrix multiplication.
-
standard
public static <T extends Field<T>> void standard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between a sparse COO matrix and a dense matrix using a standard algorithm.- Parameters:
src1
- Non-zero data of the sparse matrix.rowIndices
- Row indices for non-zero data of the sparse matrix.colIndices
- Column indices for non-zero data of the sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense matrix.shape2
- Shape of the dense matrix.dest
- Array to store the dense result of the matrix multiplication.
-
concurrentStandard
public static <T extends Field<T>> void concurrentStandard(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest) 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 data of the sparse matrix.rowIndices
- Row indices for non-zero data of the sparse matrix.colIndices
- Column indices for non-zero data of the sparse matrix.shape2
- Shape of the sparse matrix.dest
- Array to store the dense result of the matrix multiplication.
-
concurrentStandard
public static <T extends Field<T>> void concurrentStandard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.- Parameters:
src1
- Non-zero data of the sparse matrix.rowIndices
- Row indices for non-zero data of the sparse matrix.colIndices
- Column indices for non-zero data of the sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense matrix.shape2
- Shape of the dense matrix.
-
standardVector
public static <T extends Field<T>> void standardVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) 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 data of the sparse vector.indices
- Indices of non-zero data in sparse vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-
standardVector
public static <T extends Field<T>> void standardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the sparse matrix dense vector multiplication using a standard algorithm.- Parameters:
src1
- Entries of the sparse matrix.rowIndices
- Row indices of non-zero data in sparse matrix.colIndices
- Column indices of non-zero data in sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense vector.shape2
- Shape of the dense vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-
blockedVector
public static <T extends Field<T>> void blockedVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) 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 data of the sparse vector.indices
- Indices of non-zero data in sparse vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-
concurrentStandardVector
public static <T extends Field<T>> void concurrentStandardVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) 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 data of the sparse vector.indices
- Indices of non-zero data in sparse vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-
concurrentStandardVector
public static <T extends Field<T>> void concurrentStandardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest) 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 data in sparse matrix.colIndices
- Column indices of non-zero data in sparse matrix.shape1
- Shape of the sparse matrix.src2
- Entries of the dense vector.shape2
- Shape of the dense vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-
concurrentBlockedVector
public static <T extends Field<T>> void concurrentBlockedVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest) 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 data of the sparse vector.indices
- Indices of non-zero data in sparse vector.dest
- Array to store the dense result of the matrix-vector multiplication.
-