Mercurial > hg > nsaunier > traffic-intelligence
diff trafficintelligence/tests/indicators.txt @ 1256:56d0195d043e
cleaning indicators (no more time interval) and runtimeerror with arccos
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 03 Apr 2024 14:41:20 -0400 |
| parents | b1ba6d44fcb9 |
| children | 76f5693b530c |
line wrap: on
line diff
--- a/trafficintelligence/tests/indicators.txt Wed Apr 03 12:30:36 2024 -0400 +++ b/trafficintelligence/tests/indicators.txt Wed Apr 03 14:41:20 2024 -0400 @@ -1,7 +1,7 @@ >>> from trafficintelligence.indicators import * ->>> from trafficintelligence.moving import TimeInterval,Trajectory +>>> from trafficintelligence.moving import TimeInterval, Trajectory ->>> indic1 = TemporalIndicator('bla', [0,3,-4], TimeInterval(4,6)) +>>> indic1 = TemporalIndicator('bla', {4:0,5:3,6:-4}) >>> indic1.empty() False >>> indic1.getIthValue(1) @@ -19,7 +19,7 @@ >>> indic1[2] 0 ->>> ttc = SeverityIndicator('TTC', list(range(11)), TimeInterval(1,11), mostSevereIsMax = False) +>>> ttc = SeverityIndicator('TTC', {t:t-1 for t in TimeInterval(1,11)}, mostSevereIsMax = False) >>> ttc.getMostSevereValue(1) 0.0 >>> ttc.getMostSevereValue(2)
