Since
  [...@.<&# 
is the same as
  >.&#
we get the following shorter versions of Ldist and Ldist1:

  f=.>:@Ldist }: 
  mincost=: f~ <. f <. -...@=&{: + Ldist&}:
  Ldist=: >.&#`minc...@.(0 < *&#)

and

  Ldist1=:>.&#`((>:@$:}:)~<.(>:@$:}:)<. -...@=&{: + $:&}:)@.(0<*&#)

-- 
View this message in context: 
http://www.nabble.com/Levenshtein-distance-tp23273653s24193p23285829.html
Sent from the J Programming mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to