hufapp.c
来自「Numerical Recipes Software 提供的算法子程序集」· C语言 代码 · 共 16 行
C
16 行
void hufapp(index,nprob,n,i)
unsigned long i,index[],n,nprob[];
{
unsigned long j,k;
k=index[i];
while (i <= (n>>1)) {
if ((j = i << 1) < n && nprob[index[j]] > nprob[index[j+1]]) j++;
if (nprob[k] <= nprob[index[j]]) break;
index[i]=index[j];
i=j;
}
index[i]=k;
}
/* (C) Copr. 1986-92 Numerical Recipes Software . */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?