News for hackers. Stuff that matters.

Ask HN: A good C++ multi-dimensional array library?

I was working on a project which involved replacing our old numerical library back-end to some other newer alternative. I had a look at the possible options(Eigen/NT2/Armadillo/MTL4 among others) and decided to move on with Eigen. However, Eigen does not have a multi-dimensional array implementation. It can only support upto 2-D arrays. I was wondering if there are some C++ multi-dimensional libraries you folks might know of ?

Upto now, all I could find was:-

- Boost MultiArrays( specifying dimensions and size at compile time make it a no-go for me ) - Blitz++ ( same issues as above i.e. dimension needs to be specified at compile time )

It will be great if I could find something like a free version of RogueWave arrays which can be declared without specifying dimensions.

Thanks for reading through the post.

( 5 comments | 6 points | on HN )
Re:Ask HN: A good C++ multi-dimensional array library? by slavio on Wednesday October 23, 2013 @03:49PM (#6601209)
Sparse matrices or not? You could look into OpenCV's Mat and SparseMat here: http://docs.opencv.org/modules/core/doc/basic_structures.htm...
Re:Ask HN: A good C++ multi-dimensional array library? by hatred on Wednesday October 23, 2013 @04:49PM (#6601604)
Thanks for the reply slavio.

- It seems that no expression template machinery is being used? Hence, it might be too slow for most basic operations for us due to creation of temporaries. - Does not have support for n-dimensional views. You can only get a view upon contiguous rows or columns. ( However, I might ignore this if the first point is settled ) - No vectorization support etc which you get with other libraries like Eigen/NT2 among others.

I might be wrong on some points though.

Re:Ask HN: A good C++ multi-dimensional array library? by torrent on Wednesday October 23, 2013 @03:10PM (#6600941)
I dont know which operations you are going to do with the arrays but what about just use a array of arrays or matrices of matrices of matrices of...?
Re:Ask HN: A good C++ multi-dimensional array library? by hatred on Wednesday October 23, 2013 @04:51PM (#6601616)
I am willing go give away everything for now and just have support for basic arithmetic operations, creation of sub matrix views ala numpy for the time being. I will be able to do the other operations via Eigen by creating a view over the native array. I hate the idea of creating an array of arrays though.
Re:Ask HN: A good C++ multi-dimensional array library? by torrent on Saturday October 26, 2013 @07:15PM (#6619848)
Hateing the idea of array of arraya is like hating recursivity.