public static int [ ] unravelIndex ( int configIx , int ... dims ) { int numConfigs = IntArrays . prod ( dims ) ; assert configIx < numConfigs ; int [ ] strides = getStrides ( dims ) ; return unravelIndexFromStrides ( configIx , strides ) ; }
Returns an integer array of the same length as dims that matches the configIx th configuration if enumerated configurations in order such that the leftmost dimension changes slowest