Aug
19.
I just downloaded the latest jBLAS version, added it to my classpath and … it worked! That was easier than expected, because at the time I was involved, we had to compile the native fortran stuff manually for each target OS. Mikio Braun did hell of a job on packing everything in a single JAR.
Here’s a little code snipped that I got to work out of the box (note that it uses ATLAS under the hood)
public static void main(String[] args) { double[][] data = new double[][] {{ 1, 2, 3, 4, 5}, { 6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}}; DoubleMatrix matrix = new DoubleMatrix(data); DoubleMatrix vector = new DoubleMatrix(new double[]{3, 3, 3, 3,3}); DoubleMatrix result = matrix.mmul(vector); System.out.println(result.rows+"x"+result.columns+": "+result); }
