Lines Matching full:double
30 if (*static_cast<const double*>(p1) < *static_cast<const double*>(p2))
32 if (*static_cast<const double*>(p1) > *static_cast<const double*>(p2))
37 inline double distance(double freq, double code) {
43 int qsearch_nearest(double code_book[], double freq, int start, int end) {
61 size_t update_code_idx(double freqs[], size_t num, double code_book[],
74 double recalculate_kernel(double freqs[], size_t num, double code_book[],
76 double ret = 0;
82 double *cb_new = new double[kCodeBookSize];
84 memset(cb_new, 0, sizeof(double) * kCodeBookSize);
104 void iterate_codes(double freqs[], size_t num, double code_book[],
107 double delta_last = 0;
111 double delta = recalculate_kernel(freqs, num, code_book, code_idx);
221 double factor = static_cast<double>(kSysDictTotalFreq) / (
234 float NGram::convert_psb_to_score(double psb) {
236 log(psb) * static_cast<double>(kLogValueAmplifier));
249 double total_freq = 0;
250 double *freqs = new double[next_idx_unused];
271 double max_freq = 0;
284 freq_codes_df_ = new double[kCodeBookSize];
286 memset(freq_codes_df_, 0, sizeof(double) * kCodeBookSize);
299 double cand = freqs[freq_pos];
313 myqsort(freq_codes_df_, kCodeBookSize, sizeof(double), comp_double);
328 double log_score = log(freq_codes_df_[code_pos]);