Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你能给我一些使用递归的矩阵转置的伪代码吗?如果它在一个功能中,那就太好了。
PS:这可能不是问题,但我无法在任何地方找到信息。如果你知道一个关于递归伪代码的网站,那就太棒了。
对于方形 MxM 矩阵:
function transpose (x0, y0, x1, y1) if (M > 1) transpose (0, 0, M/2, M/2) // A transpose (0, M/2, M/2, M) // B transpose (M/2, 0, M, M/2) // C transpose (M/2, M/2, M, M) // D swap blocks B and C endif transpose (0, 0, M, M)