0

I have found a nice Java library for linear algebra, named JAMA

In Java, I can use such library by writing:

double[N][M] mat;
for (int r = 0; r < N; r++)
  for (int c = 0; c < M; c++)
    mat[r][c] = ...;

Matrix A = new Matrix(mat);

I would like to use the same library inside a Scala program.

I need to use the double[][] data type, in order to pass it to the Matrix constructor. How can I express such data type in Scala?

Thank you

Aslan986
  • 9,984
  • 11
  • 44
  • 75
  • 1
    [Array.ofDim](http://scala-lang.org/api/current/scala/Array$.html)? And, this [SO post](http://stackoverflow.com/q/7254546/205936) – S.R.I Dec 14 '13 at 17:08
  • You may also want to consider a Scala library such as Breeze: https://github.com/scalanlp/breeze/wiki/Breeze-Linear-Algebra – Alexey Romanov Dec 15 '13 at 06:21

0 Answers0