Lines Matching full:population
154 static double HuffmanCost(const int* const population, int length) {
164 if (population[i] == population[i + 1]) {
168 // population[i] points now to the symbol in the streak of same values.
170 if (population[i] == 0) {
176 if (population[i] == 0) {
191 static double PopulationCost(const int* const population, int length) {
192 return BitsEntropy(population, length) + HuffmanCost(population, length);
195 static double ExtraCost(const int* const population, int length) {
198 for (i = 2; i < length - 2; ++i) cost += (i >> 1) * population[i + 2];