Optimal in-place transposition of rectangular matrices
Given a rectangular m x n matrix stored as a two-dimensional array, we want to transpose it in place and measure the cost by the number of memory writes and the number of auxiliary cells used. We propose a transposition algorithm with optimal complexity O(mn) using only min(m, n) auxiliary memory cells. (C) 2009 Elsevier Inc. All rights reserved.
transposition rectangular matrices in-place algorithms data rearrangement