public final int getIndex ( int coordinate [ ] ) { int index = coordinate [ 0 ] * strides [ 0 ] ; for ( int i = 1 ; i < coordinate . length ; i ++ ) { index += strides [ i ] * coordinate [ i ] ; } return index ; }
For a N - Dimensional histogram it will return the array index for the N - D coordinate