Dimension-independent multi_array slice creation
I'm having problems creating a slice of a multi_array in a
dimension-independent manner. Could someone please help?
The code posted here gives me the error
no match for 'operator[]' in 'rn2t[indices]'
Some explanations to the code snippet below:
My class is templated over an unsigned int Dim.
rn2t is a tensor of rank Dim+2 with real-valued elements.
bin_index is of dimension Dim+1, and contains integer indices into a tensor.
I want my_slice to be the one-dimensional vector pointed to by bin_index.
////////////////////////////////////////////////////////////
// Convenience typedefs for multi-rank arrays:
typedef typename boost::multi_array
participants (1)
-
Martin Magnusson