Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 96:9928c2fa72cc
added equal method to intervals
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 13 Jun 2011 16:50:40 -0400 |
parents | 19603b5fa578 |
children | b3a1c26e2f22 |
line wrap: on
line diff
--- a/python/moving.py Mon Jun 13 16:46:16 2011 -0400 +++ b/python/moving.py Mon Jun 13 16:50:40 2011 -0400 @@ -32,6 +32,9 @@ '''Returns the length of the interval''' return float(max(0,self.last-self.first)) + def equal(self, i2): + return self.first==i2.first and self.last == i2.last + def getList(self): return [self.first, self.last]