In-Place Transposition of Rectangular Matrices
Lecture Notes in Computer Science
https://doi.org/10.1007/978-3-540-75755-9_68Abstract
We present a new Algorithm for In-Place Rectangular Transposition of an m by n matrix A that is efficient. In worst case it is O(N log N) where N = mn. It uses a bit-vector of size IWORK words to further increase its efficiency. When IWORK=0 no extra storage is used. We also review some of the other existing algorithms for this problem. These contributions were made by Gower, Windley, Knuth, Macleod, Laffin and Brebner (ACM Alg. 380), Brenner (ACM Alg. 467), and Cate and Twigg (ACM Alg. 513). Performance results are given and they are compared to an Out-of-Place Transposition algorithm as well as ACM Algorithm 467.
References (13)
- M. F. Berman. A Method for Transposing a Matrix. J. Assoc. Comp. Mach. Vol. 5, 1958, pp. 383-384.
- P. F. Windley. Tranpsoing matrices in a digital computer. Comput. J., Vol. 2, April 1959, pp. 47-48.
- J. Boothroyd. Alg. 302: Transpose vector stored array. Comm. ACM Vol. 10, No. 5, 1967, pp. 292-293.
- D. Knuth. Problem 12, page 180 and Solution to Problem 12. page 517. The Art of Computer Programming, Vol. 1, 1st edition, 2nd printing book, Addison-Wesley, Reading Mass., 1969
- I. D. G. Macleod. An Algorithm For In-Situ Permutation. The Austrialian Computer Journal Vol. 2, No. 1 Feb. 1970, pp. 16-19.
- S. Laflin and M. A. Brebner. Alg. 380: In-situ transposition of a rectangular matrix. Comm. ACM Vol. 13, May 1970, pp. 324-326.
- D. Knuth. Matematical Analysis of Algorithms Information Processing 71, Invited Papers-Foundations North-Holland Publishing Company 1972
- N. Brenner. Matrix Transposition in Place. Comm. ACM Vol. 16, No. 11, Nov. 1973, pp. 692-694.
- E. G. Cate and D. W. Twigg. Algorithm 513: Analysis of In-Situ Transposition. ACM TOMS Vol. 3, No. 1, March 1977, pp. 104-110.
- B. L. Leathers. Remark on Algorithm 513: Analysis of In-Situ Transposition. ACM TOMS Vol. 5, No. 4, Dec. 1979, pp. 520.
- R. C. Agarwal, F. G. Gustavson, M. Zubair. Exploiting functional parallelism of POWER2 to design high-performance numerical algorithms. IBM Journal of Re- search and Development, Vol. 38, No. 5, Sep. 1994, pp. 563,576.
- F. E. Fich, J. I. Munro, P. V. Poblete. Permuting In Place. SIAM Journal of Computing, Vol. 24, No. 2, Apr. 1995, pp. 266,278.
- D. Knuth. Problem 12, page 182 and Solution to Problem 12. page 523. The Art of Computer Programming, Vol. 1, 3rd edition, 4th printing book, Addison-Wesley, Reading Mass., 1997