Mercurial Hosting > traffic-intelligence
comparison python/moving.py @ 828:14e4ad7c7420
work on merging data for synchronized views
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 28 Jun 2016 17:18:45 -0400 |
parents | 21f10332c72b |
children | aa98e773ac91 |
comparison
equal
deleted
inserted
replaced
827:f6d5da619307 | 828:14e4ad7c7420 |
---|---|
96 | 96 |
97 class TimeInterval(Interval): | 97 class TimeInterval(Interval): |
98 '''Temporal interval: set of instants at fixed time step, between first and last, included | 98 '''Temporal interval: set of instants at fixed time step, between first and last, included |
99 | 99 |
100 For example: based on frame numbers (hence the modified length method) | 100 For example: based on frame numbers (hence the modified length method) |
101 It may be modified directly by setting first and last''' | 101 It may be modified directly by setting first and last |
102 | 102 It also (mostly) works with datetime.datetime''' |
103 def __init__(self, first=0, last=-1): | 103 |
104 super(TimeInterval, self).__init__(first, last, False) | 104 def __init__(self, first=0, last=-1, revert = False): |
105 super(TimeInterval, self).__init__(first, last, revert) | |
105 | 106 |
106 @staticmethod | 107 @staticmethod |
107 def fromInterval(inter): | 108 def fromInterval(inter): |
108 return TimeInterval(inter.first, inter.last) | 109 return TimeInterval(inter.first, inter.last) |
109 | 110 |