由买买提看人间百态

topics

全部话题 - 话题: daniumen
(共0页)
e*******i
发帖数: 56
1
来自主题: JobHunting版 - 求教rotate matrix扩展的解法
It is essentially to convert a C 2D array to a Fortran 2D array.
Hard to believe this method will be faster than in-place swapping method.
Its (N-1-k/N+k%N) index conversion and extra copy-back will kill performance.
DaNiuMen have any better solutions?

: the (i,j) entry is given by
: arr[i*N+j] (concatenating rows)
: or
: arr[i+j*N] (concatenating columns)
: suppose the given 2-D matrix is represented in the first form, you can
: generate a rotated matrix expressed in the second form:
: for(int... 阅读全帖
m******u
发帖数: 12400
2
来自主题: Stock版 - any pick?
DaNiuMen
k****r
发帖数: 807
3
来自主题: Programming版 - HOW TO DELETE IN KEY-VALUE STORE
Many thanks for DANIUMEN!!! I think I still have a lot of things to learn:)
(共0页)