Mercurial Hosting > traffic-intelligence
diff python/tests/moving.txt @ 576:0eff0471f9cb
added functions to use trajectories as alignments
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 28 Aug 2014 16:42:13 -0400 |
parents | cae4e5f3fe9f |
children | d0abd2ee17b9 |
line wrap: on
line diff
--- a/python/tests/moving.txt Wed Aug 13 10:51:16 2014 -0400 +++ b/python/tests/moving.txt Thu Aug 28 16:42:13 2014 -0400 @@ -96,6 +96,17 @@ >>> t1.differentiate() (1.000000,2.000000) (2.000000,5.000000) +>>> t1.computeCumulativeDistances() +>>> t1.getDistance(0) +2.23606797749979 +>>> t1.getDistance(1) +5.385164807134504 +>>> t1.getCumulativeDistance(1) +7.6212327846342935 +>>> t1.getCumulativeDistance(2) +Index 2 beyond trajectory length 3-1 + + >>> from utils import LCSS >>> lcss = LCSS(lambda x,y: Point.distanceNorm2(x,y) <= 0.1) >>> Trajectory.lcss(t1, t1, lcss)