Ask HN: A good C++ multi-dimensional array library?
2 comments
Sparse matrices or not? You could look into OpenCV's Mat and SparseMat here:
http://docs.opencv.org/modules/core/doc/basic_structures.htm...
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.
- 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.
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...?
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.
Hateing the idea of array of arraya is like hating recursivity.
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.