Lines Matching defs:coin
646 A coin, this is the terminology used for the package-merge algorithm and the
647 coin collector's problem. This is used to generate the huffman tree.
648 A coin can be multiple coins (when they're merged)
653 float weight; /*the sum of all weights in this coin*/
761 /*Package-Merge algorithm represented by coin collector's problem
799 /*merge prev_row[i] and prev_row[i + 1] into new coin*/
800 Coin* coin = &coins[numcoins++];
801 coin_copy(coin, &prev_row[i]);
802 add_coins(coin, &prev_row[i + 1]);
816 /*calculate the lenghts of each symbol, as the amount of times a coin of each symbol is used*/
819 Coin* coin = &coins[i];
820 for(j = 0; j < coin->symbols.size; j++) lengths[coin->symbols.data[j]]++;