算法中 for 循环是否为空循环?还是写错了?
void digitrev_index_short(unsigned short *index, int n2, int radix){
int i,j,k;
index[0] = 0;
for ( i = 1, j = n2/radix + 1; i < n2 - 1; i++)
{
index[i] = j - 1;
for (k = n2/radix; k*(radix-1) < j; k /= radix)
j -= k*(radix-1);
j += k;
}
index[n2 - 1] = n2 - 1;
}