I believe boost has a limitation on contiguous or at least step-wise consistent slicing of matrices. In R, I could have a random vector c(5,2,8) and use that to index into a matrix M[c(5,2,8),] for example…
I believe boost has a limitation on contiguous or at least step-wise consistent slicing
Share
Armadillo supports this as of version 3.0 which was released not even two weeks ago.
Here is a worked example via RcppArmadillo:
There is a matching function to pick rows rather than columns.