Method: Amatch::Hamming#similar
- Defined in:
- ext/amatch_ext.c
#similar(strings) ⇒ Object
Uses this Amatch::Hamming instance to match Amatch::Hamming#pattern against strings
, and compute 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 Fixnum or an Array of Fixnums respectively.
1419 1420 1421 1422 1423 |
# File 'ext/amatch_ext.c', line 1419
static VALUE rb_Hamming_similar(VALUE self, VALUE strings)
{
GET_STRUCT(General)
return General_iterate_strings(amatch, strings, Hamming_similar);
}
|