comparison trafficintelligence/moving.py @ 1037:6a6c37eb3a74

added function to load prototype assignments
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 03 Jul 2018 23:58:16 -0400
parents 933588568bec
children fc7c0f38e8a6
comparison
equal deleted inserted replaced
1036:0d7e5e290ea3 1037:6a6c37eb3a74
1782 return self.movingObject 1782 return self.movingObject
1783 def setMovingObject(self, o): 1783 def setMovingObject(self, o):
1784 self.movingObject = o 1784 self.movingObject = o
1785 def __str__(self): 1785 def __str__(self):
1786 return '{} {} {}'.format(self.filename, self.num, self.trajectoryType) 1786 return '{} {} {}'.format(self.filename, self.num, self.trajectoryType)
1787 def __eq__(self, p2):
1788 return self.filename == p2.filename and self.num == p2.num and self.trajectoryType == p2.trajectoryType
1789 def __hash__(self):
1790 return hash((self.filename, self.num, self.trajectoryType))
1787 1791
1788 ################## 1792 ##################
1789 # Annotations 1793 # Annotations
1790 ################## 1794 ##################
1791 1795