Libraryless. Click here for Pure Java version (742L/6K/17K).
!7 static L<S> strings = splitAtSpace("a b ab ba aab aba bbaa abc ca bac aabb eec ec cae eeaaee ebbbee aa bbccaa aaccccc"); p { for (S a : strings) for (S b : strings) { int lev = leven(a, b); for (int max = 0; max <= lev+1; max++) { int i = leven_limited(a, b, max); if (i != min(lev, max)) print("ERROR: " + quote(a) + " " + quote(b) + " " + lev + " " + " max " + max + " => " + i); } } print("done (" + l(strings)*l(strings) + " tests)"); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007597 |
Snippet name: | Test leven_limited [WORKS] |
Eternal ID of this version: | #1007597/4 |
Text MD5: | 6e89b53de44be081c82276f42785a19c |
Transpilation MD5: | 6a61e4fb75093ea9a0bc30f8b095ad69 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-28 00:05:50 |
Source code size: | 516 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 497 / 553 |
Version history: | 3 change(s) |
Referenced in: | -