1、二维数组
以行为主:Loc(A(i,j))=∂+n*(i-1)*d+(j-1)*d
以列为主:Loc(A(i,j))=∂+(i-1)*d+m*(j-1)*d
2、三维数组
以行为主:Loc(A(i,j,k))=∂+(i-1)*u2*u3*d+(j-1)*u3*d+(k-1)*d
以列为主:Loc(A(i,j,k))=∂+(k-1)*u2*u1*d+(j-1)*u1*d+(i-1)*d
.
.
.
n维数组:
以行为主:Loc(A(i1,i2,i3.....,in))=∂+(i1-1)*u2*u3*u4*.....*un*d+(i2-1)*u3*u4.....*un*d....+(in-1)*d
以列为主:Loc(A(i1,i2,i3,.....in))=∂+(in-1)*Un-1*Un-2*....*U1*d+(in-1)*Un-2*Un-3*...*U1*d+......(i1-1)*d