0

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?

f_puras
  • 2,521
  • 4
  • 33
  • 38
leocasucci
  • 101
  • 1
  • 1
  • 5
  • 1
    Are you planning on deleting this question once you get an answer, like you did with your question yesterday about creating an NxN matrix? Just so people know before investing effort in answering. – Andy Turner Mar 15 '16 at 08:29
  • Sorry, the previous question was wrong, I could not edit the question, therefore I created a new one. – leocasucci Mar 15 '16 at 08:34

1 Answers1

0

Apache common math only supports 2-dimensional matrices.

Andy Turner
  • 137,514
  • 11
  • 162
  • 243