Mercurial Hosting > traffic-intelligence
diff python/tests/utils.txt @ 368:2db4e76599a1
implemented subsequence extraction and rearranged arguments
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 15 Jul 2013 15:08:53 -0400 |
parents | 90bdabc06e9f |
children | 027e254f0b53 |
line wrap: on
line diff
--- a/python/tests/utils.txt Mon Jul 15 12:13:08 2013 -0400 +++ b/python/tests/utils.txt Mon Jul 15 15:08:53 2013 -0400 @@ -62,6 +62,15 @@ 3 >>> LCSS(['a','b','c','x','d'], ['a','b','c','d','x'], lambda x,y: x == y) 4 +>>> LCSS(['a','b','c'], ['a','b','x','x','c'], lambda x,y: x == y, 1) +2 + +>>> LCSS(['a','b','c'], ['a','b','c', 'd'], lambda x,y: x == y, returnSubSequence = True) +(3, [(0, 0), (1, 1), (2, 2)]) +>>> LCSS(['a','b','c'], ['x','a','b','c'], lambda x,y: x == y, returnSubSequence = True) +(3, [(0, 1), (1, 2), (2, 3)]) +>>> LCSS(['a','g','b','c'], ['a','b','c', 'd'], lambda x,y: x == y, returnSubSequence = True) +(3, [(0, 0), (2, 1), (3, 2)]) >>> alignedLCSS(range(5), range(5), lambda x,y:(abs(x-y) <= 0.1), 2) 5