I have a raw array from a low-level library double[] a
of known size.
This array is in fact filled with subarrays of same size, i.e. a == [p0[n], p1[n], ... pM[n]]
.
I need to shuffle the subarrays, i.e. to make a permutation of p0[n], ..., pM[n]
. For this I can use std::random_shuffle
, but I have to cast the raw array to an array, where each element has sizeof(p) == n * sizeof(double)
. The n
is defined by a variable and not compile-time known.
How would I do that or is it possible at all?