Mercurial Hosting > traffic-intelligence
changeset 108:6efe470ea5e5
added test existsAtInstant to STObject
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 15 Jul 2011 03:04:39 -0400 |
parents | 916678481896 |
children | 04a874e1f19f |
files | python/moving.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/python/moving.py Fri Jul 15 02:32:34 2011 -0400 +++ b/python/moving.py Fri Jul 15 03:04:39 2011 -0400 @@ -112,6 +112,9 @@ def getTimeInterval(self): return self.timeInterval + def existsAtInstant(self, t): + return self.timeInterval.contains(t) + def commonTimeInterval(self, obj2): return self.getTimeInterval().intersection(obj2.getTimeInterval())