I need to handle nD (n-Dimension, arbitrary n) matrixes using Java and I am trying to use apache commons math. I just need the common operations: sum, multiply, divide, traspose etc.
I can easily create N x N matrixes of doubles:
RealMatrix sampleMatrix = MatrixUtils.createRealMatrix(2, 2);
sampleMatrix.setEntry(0, 0, 1);
sampleMatrix.setEntry(0, 1, 2);
sampleMatrix.setEntry(1, 0, 3);
sampleMatrix.setEntry(1, 1, 4);
System.out.println(sampleMatrix);
Does anybody know how to create and handle a matrix having an arbitrary number of dimensions (N x N x N x N...) with this library?