diff python/tests/moving.txt @ 369:027e254f0b53

lcss subclass for indicators
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 15 Jul 2013 16:47:09 -0400
parents fa64b2e3a64f
children 349eb1e09f45
line wrap: on
line diff
--- a/python/tests/moving.txt	Mon Jul 15 15:08:53 2013 -0400
+++ b/python/tests/moving.txt	Mon Jul 15 16:47:09 2013 -0400
@@ -75,9 +75,12 @@
 >>> t1.getTrajectoryInPolygon(np.array([[10,10],[14,10],[14,13],[10,13]])).length()
 0
 
->>> Trajectory.norm2LCSS(t1, t1, 0.1)
+>>> from utils import LCSS
+>>> lcss = LCSS(lambda x,y: Point.distanceNorm2(x,y) <= 0.1)
+>>> Trajectory.lcss(t1, t1, lcss)
 3
->>> Trajectory.normMaxLCSS(t1, t1, 0.1)
+>>> lcss = LCSS(lambda p1, p2: (p1-p2).normMax() <= 0.1)
+>>> Trajectory.lcss(t1, t1, lcss)
 3
 
 >>> o1 = MovingObject(positions = Trajectory([[0]*3,[2]*3]), velocities = Trajectory([[0]*3,[1]*3]))