Method: Amatch::StringMethods#hamming_similar
- Defined in:
- ext/amatch_ext.c
#hamming_similar(strings) ⇒ Object
If called on a String, this string is used as a Amatch::Hamming#pattern to match against strings. It returns a Hamming distance metric number between 0.0 for very unsimilar strings and 1.0 for an exact match. strings has to be either a String or an Array of Strings. The returned results is either a Float or an Array of Floats respectively.
1435 1436 1437 1438 1439 |
# File 'ext/amatch_ext.c', line 1435
static VALUE rb_str_hamming_similar(VALUE self, VALUE strings)
{
VALUE amatch = rb_Hamming_new(rb_cHamming, self);
return rb_Hamming_similar(amatch, strings);
}
|