diff trafficintelligence/moving.py @ 1122:58efbe18f102

slight modification
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 10 Jul 2019 16:08:41 -0400
parents bb58506c1bfd
children 0548a78852b8
line wrap: on
line diff
--- a/trafficintelligence/moving.py	Mon Jul 08 16:27:18 2019 -0400
+++ b/trafficintelligence/moving.py	Wed Jul 10 16:08:41 2019 -0400
@@ -738,6 +738,11 @@
         else:
             return False
 
+    def append(self,other):
+        '''adds positions of other to the trajectory (in-place modification)'''
+        for p in other:
+            self.addPosition(p)
+
     def setPositionXY(self, i, x, y):
         if i < self.__len__():
             self.positions[0][i] = x
@@ -1076,11 +1081,6 @@
         lanes = [lane]*nPoints
         return CurvilinearTrajectory(S, Y, lanes)
 
-    def append(self,other):
-        '''adds positions of other to the curvilinear trajectory (in-place modification)'''
-        for p in other:
-            self.addPosition(p)
-
     @staticmethod
     def fromTrajectoryProjection(t, alignments, halfWidth = 3):
         ''' Add, for every object position, the class 'moving.CurvilinearTrajectory()'