0

I have to implement an algorithm which uses a 2D data structure but each cell of the data has to be a further matrix. Which java library should I use? Thanks!

M Omayr
  • 1,351
  • 1
  • 9
  • 19

1 Answers1

2

You may try to use the JAMA Java Matrix Package: http://math.nist.gov/javanumerics/jama/

I have used it quite lot some years ago and the ability to create Arrays containing Matrix Objects may suite your needs directly.

Anyhow you may find this 2 questions interesting:

(1) Java matrix libraries (2) Performance of Java matrix math libraries?

Community
  • 1
  • 1
Stefan
  • 2,603
  • 2
  • 33
  • 62
  • I looked over the class Matrix of this library but couldn't find how to make arrays containing matrix.. What am I missing there? But Thanks it's good library – M Omayr Jan 31 '14 at 09:48
  • What did you not understand? You make an array of objects and each element points to an object therefor. Matrix[][] 2d_matrix_to_matrix = new Matrix[10][10]; Matrix[0][0] = new Matrix(int m, int n); This creates 2d squared array containing each element a matrix of size m x n – Stefan Jan 31 '14 at 10:01
  • Alright now I'm there that's what I wanted – M Omayr Jan 31 '14 at 10:15