Mercurial Hosting > traffic-intelligence
diff python/indicators.py @ 370:97e8fa0ee9a1
work in progress for complete alignment
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 15 Jul 2013 18:18:44 -0400 |
parents | 027e254f0b53 |
children | 2ea8584aa80a |
line wrap: on
line diff
--- a/python/indicators.py Mon Jul 15 16:47:09 2013 -0400 +++ b/python/indicators.py Mon Jul 15 18:18:44 2013 -0400 @@ -110,21 +110,21 @@ def __init__(self, threshold, delta = float('inf'), aligned = False, lengthFunc = min): utilsLCSS.__init__(self, lambda x,y: (distanceForLCSS(x,y) <= threshold), delta, aligned, lengthFunc) - def get(self, indicator1, indicator2): + def compute(self, indicator1, indicator2): if indicator1 and indicator2: - return self.compute(indicator1.getValues(), indicator2.getValues()) + return self._compute(indicator1.getValues(), indicator2.getValues()) else: return 0 - def getNormalized(self, indicator1, indicator2): + def computeNormalized(self, indicator1, indicator2): if indicator1 and indicator2: - return self.computeNormalized(indicator1.getValues(), indicator2.getValues()) + return self._computeNormalized(indicator1.getValues(), indicator2.getValues()) else: return 0. - def getDistance(self, indicator1, indicator2): + def computeDistance(self, indicator1, indicator2): if indicator1 and indicator2: - return self.computeDistance(indicator1.getValues(), indicator2.getValues()) + return self._computeDistance(indicator1.getValues(), indicator2.getValues()) else: return 1.