阅读背景:

动态分配二维矩阵换位(有效内存)

来源:互联网 

I want to transpose a matrix in C, with as little memory use as possible. Therefore it is not an option to simply create a copy of the matrix, fill it in, and delete the other one afterwards. I thus want to do every swap on the matrix itself, with 1 temp variable to reuse. Matrix elements are indexed with pointer arithmetic, but as far as I'm aware, these are correct. The problem now being that the function doesn't result in any changes. The matrix struct is dynamically allocated and has the folowing structure;I want to transpose a matrix in C, with as litt




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: