Constructs and returns a new
dice (transposition) view; Swaps axes; example: 3 x 4 matrix --> 4 x 3 matrix. The view has both dimensions exchanged; what used to be columns become rows, what used to be rows become columns. In other words:
view.get(row,column)==this.get(column,row). This is a zero-copy transposition, taking O(1), i.e. constant time. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa. Use idioms like
result = viewDice(A).copy() to generate an independent transposed matrix.
Example:
2 x 3 matrix: 1, 2, 3 4, 5, 6 | transpose ==> | 3 x 2 matrix: 1, 4 2, 5 3, 6 | transpose ==> | 2 x 3 matrix: 1, 2, 3 4, 5, 6 |
@return a new dice view.