Jan,

I have looked for a description of Tanimoto distance but have not found 
anything useful.  Can you describe what it is or point to a description 
of it?

Henry Rich

Jan Jacobs wrote:
> Henry,
> very good. For longer strings it is more than double so fast as the previous
> version. In my test cases it even consumes less memory.
> Is it possible to include this as a native function in J (e.g. overloading
> -. or s:)?
> Same question but now for Tanimoto distance?
> Jan.
> 
> 
> On 12/19/09, R.E. Boss <[email protected]> wrote:
>> Smart analysis. Chapeau!
>>
>>
>> R.E. Boss
>>
>>
>> -----Oorspronkelijk bericht-----
>> Van: [email protected]
>> [mailto:[email protected]] Namens Henry Rich
>> Verzonden: zaterdag 19 december 2009 3:00
>> Aan: Programming forum
>> Onderwerp: [Jprogramming] Levenshtein distance
>>
>> I was working with R. E.'s compact implementation of the Levenshtein
>> distance and I found an interesting equivalence:
>>
>> (<. >:)/\.&.|.
>>
>> can be replaced by
>>
>> (<./\@:- + ]) i...@#
>>
>> which uses a little more space but is quite a bit faster for large
>> operands.  So now I have the version:
>>
>> NB. Levenshtein distance between two strings
>> levdist=: 4 : 0
>> 'a b'=. (/: #&>)x;y
>> z=. i.>:#b
>> for_j. a do.
>> z=. ((<./\@:- + ]) i...@#) ((j ~: b) + }:z) ({...@] , (<. }.)) >:z
>> end.
>> {:z
>> )
>>
>>
>> Henry Rich
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> 
> 
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to