Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Hamming Distance Between 2 Strings - Fast(est) Way?

by NateTut (Deacon)
on Oct 14, 2005 at 14:39 UTC ( [id://500237]=note: print w/replies, xml ) Need Help??


in reply to Hamming Distance Between 2 Strings - Fast(est) Way?

Check Out Text::LevenshteinXS

Replies are listed 'Best First'.
Re^2: Hamming Distance Between 2 Strings - Fast(est) Way?
by monkfan (Curate) on Oct 21, 2005 at 10:31 UTC
    Dear NateTut,
    This module doesn't compute the exact Hamming Distance as I required.
    Instead it returns edit distance. Here is the example:
    perl -MText::LevenshteinXS -e ' $s1 = 'GGAAG'; $s2 = 'GAAGA'; $diff = distance($s1,$s2); print "$diff\n";'
    It prints: 2 instead of 3.

    Regards,
    Edward

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://500237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-16 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found