Oliver Fochler wrote:
Hi,
I'm trying to write some dimension independent routine that makes use of Boost.MultiArray containers. The thing is that I would need several such MultiArrays within this routine with the number of MultiArrays depending on the overall number of dimensions. And here is where it becomes complicated (at least for me). Let N be the overall number of dimensions the routine works with. Then I would a collection of N MultiArrays - but not with fixed dimensions but rather with varying (internal) dimension. That is, a collection like this:
boost::multi_array
A boost::multi_array B boost::multi_array C ... However, since N may vary when the routine is called I cannot hardcode the array as above. I was thinking of a vector of multi_array or something like that. But then I don't know how to treat the second template parameter in defining the type of the vector (array, ...).
Is there a simple and efficient way to do this?
If you know N at compile why not using a fusion::vector of multi_array ?