Searched defs:cost_del (Results 1 - 1 of 1) sorted by relevance

/PHP_TRUNK/ext/standard/
H A Dlevenshtein.c30 static zend_long reference_levdist(const char *s1, size_t l1, const char *s2, size_t l2, zend_long cost_ins, zend_long cost_rep, zend_long cost_del )
40 return l1 * cost_del;
53 p2[0] = p1[0] + cost_del;
57 c1 = p1[i2 + 1] + cost_del;
91 /* {{{ proto int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])
99 zend_long cost_ins, cost_rep, cost_del; local
111 if (zend_parse_parameters(5, "sslll", &str1, &str1_len, &str2, &str2_len, &cost_ins, &cost_rep, &cost_del) == FAILURE) {
114 distance = reference_levdist(str1, str1_len, str2, str2_len, cost_ins, cost_rep, cost_del);

Completed in 2 milliseconds