'jblas 2-d matrix multiplication
I want to compute 2d matrix-matrix multiplication using the Jblas library. But I failed every time to compute. Please help me to do this by giving an example with data.
Solution 1:[1]
That should be fairly straightforward, just make sure that your matrices have the right size:
DoubleMatrix matA = new DoubleMatrix(2, 2, 1, 2, 3, 4);
DoubleMatrix matB = new DoubleMatrix(2, 2, 5, 6, 7, 8);
DoubleMatrix res = matA.mmul(matB);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | PebNischl |