Class DenseMatrixMultiplicationByIjk
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.matrixtype.mathoperation.multiplication.DenseMatrixMultiplicationByIjk
-
- All Implemented Interfaces:
DenseMatrixMultiplication
public class DenseMatrixMultiplicationByIjk extends Object implements DenseMatrixMultiplication
Implements the naive IJK algorithm. When the matrices are large, this implementation switches to parallel execution with multiple threads.
-
-
Constructor Summary
Constructors Constructor Description DenseMatrixMultiplicationByIjk()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
multiply(double[] A, double[] B, double[] C, int m, int n, int p)
Multiplies two matrices, C = A %*% B.
-
-
-
Method Detail
-
multiply
public void multiply(double[] A, double[] B, double[] C, int m, int n, int p)
Description copied from interface:DenseMatrixMultiplication
Multiplies two matrices, C = A %*% B.- Specified by:
multiply
in interfaceDenseMatrixMultiplication
- Parameters:
A
- the left operand, the multiplicand matrix, in row-major representationB
- the right operand, the multiplier matrix, in column-major representation, i.e., row-major representation of transposed BC
- the allocated memory space for storing the result, in row-major representationm
- the number of rows of the multiplicand matrixn
- the number of columns (rows) of the multiplicand (multiplier) matrixp
- the number of columns of the multiplier matrix
-
-