public static int [ ] unravelIndexMatlab ( int configIx , int ... dims ) { dims = dims . clone ( ) ; ArrayUtils . reverse ( dims ) ; int [ ] config = unravelIndex ( configIx , dims ) ; ArrayUtils . reverse ( config ) ; return config ; }
Returns an integer array of the same length as dims that matches the configIx th configuration if enumerated configurations in order such that the rightmost dimension is fastest