# HG changeset patch # User Nicolas Saunier # Date 1562789321 14400 # Node ID 58efbe18f102027384d3b1bf570a51000aaaba80 # Parent 6baa915dd8bdb16108687df581aa44c0574f229d slight modification diff -r 6baa915dd8bd -r 58efbe18f102 trafficintelligence/moving.py --- 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()'