diff python/moving.py @ 369:027e254f0b53

lcss subclass for indicators
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 15 Jul 2013 16:47:09 -0400
parents 2db4e76599a1
children 349eb1e09f45
line wrap: on
line diff
--- a/python/moving.py	Mon Jul 15 15:08:53 2013 -0400
+++ b/python/moving.py	Mon Jul 15 16:47:09 2013 -0400
@@ -539,12 +539,8 @@
     # version 2: use shapely polygon contains
 
     @staticmethod
-    def norm2LCSS(t1, t2, threshold):
-        return utils.LCSS(t1, t2, lambda x,y: Point.distanceNorm2(x,y) <= threshold)
-
-    @staticmethod
-    def normMaxLCSS(t1, t2, threshold):
-        return utils.LCSS(t1, t2, lambda p1, p2: (p1-p2).normMax() <= threshold)
+    def lcss(t1, t2, lcss):
+        return lcss.compute(t1, t2)
 
 class CurvilinearTrajectory(Trajectory):
     '''Sub class of trajectory for trajectories with curvilinear coordinates and lane assignements