|
-
May 25th, 1999, 03:20 AM
#1
How to mirror a m*n matrix diagonally?
I want to mirror a m*n matrix of doubles diagonally, like:
1 2 3 1 4
4 5 6 => 2 5
3 6
However, I don't want to allocate two matrices and copy one into the other. Instead, I want to have one double *matrix, which I interpret as a 2-dimensional matrix, i.e. matrix[a][b] = matrix[a*width+b]. This is due to memory restrictions, because the matrix I want to mirror may be huge (several MB).
Any ideas or mathematical solutions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|