My problem is this: I've an array with values from 0 to 8(a[9]=[0,1,2,....,8] and I would map the indexes of array to a matrix 3x3. This is useful for me to develop the "Broadcast Multiply Rolling" algorithm to make the product of two matrices. Thank to everyone
If index is an index into a single-dimensional array of 9 elements, the array can be viewed as a two-dimensional 3x3 array with this:
int row = index / 3;
int column = index % 3;
int foo = array[row][column];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With