Mercurial Hosting > traffic-intelligence
diff python/indicators.py @ 341:2f39c4ed0b62
first version of indicator saving to sqlite
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 20 Jun 2013 14:31:24 -0400 |
parents | 1046b7346886 |
children | 2db4e76599a1 |
line wrap: on
line diff
--- a/python/indicators.py Wed Jun 19 23:35:24 2013 -0400 +++ b/python/indicators.py Thu Jun 20 14:31:24 2013 -0400 @@ -18,7 +18,6 @@ def __init__(self, name, values, timeInterval=None, maxValue = None): self.name = name - self.isCosine = (name.find('Cosine') >= 0) if timeInterval: assert len(values) == timeInterval.length() self.timeInterval = timeInterval @@ -69,6 +68,9 @@ def getTimeInterval(self): return self.timeInterval + def getName(self): + return self.name + def getValues(self): return [self.__getitem__(t) for t in self.timeInterval]