Mercurial > hg > nsaunier > traffic-intelligence
comparison python/tests/moving.txt @ 91:daa05fae1a70
modified the type of the result of interval lengths to float, added comments
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 09 Jun 2011 16:03:17 -0400 |
| parents | 5d487f183fe2 |
| children | a5ef9e40688e |
comparison
equal
deleted
inserted
replaced
| 90:f84293ad4611 | 91:daa05fae1a70 |
|---|---|
| 3 >>> Interval().empty() | 3 >>> Interval().empty() |
| 4 True | 4 True |
| 5 >>> Interval(0,1).empty() | 5 >>> Interval(0,1).empty() |
| 6 False | 6 False |
| 7 >>> Interval(0,1).length() | 7 >>> Interval(0,1).length() |
| 8 1 | 8 1.0 |
| 9 >>> Interval(23.2,24.9).length() | 9 >>> Interval(23.2,24.9).length() |
| 10 1.6999999999999993 | 10 1.6999999999999993 |
| 11 >>> Interval(10,8).length() | 11 >>> Interval(10,8).length() |
| 12 0 | 12 0.0 |
| 13 | 13 |
| 14 >>> TimeInterval(0,1).length() | 14 >>> TimeInterval(0,1).length() |
| 15 2 | 15 2.0 |
| 16 >>> TimeInterval(10,8).length() | 16 >>> TimeInterval(10,8).length() |
| 17 0 | 17 0.0 |
| 18 | 18 |
| 19 >>> Point(3,4)-Point(1,7) | 19 >>> Point(3,4)-Point(1,7) |
| 20 (2.000000,-3.000000) | 20 (2.000000,-3.000000) |
| 21 | 21 |
| 22 >>> Point(3,2).norm2Squared() | 22 >>> Point(3,2).norm2Squared() |
| 29 False | 29 False |
| 30 >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) | 30 >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) |
| 31 True | 31 True |
| 32 | 32 |
| 33 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) | 33 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) |
| 34 >>> t1.length() | 34 >>> t1.length() == 3. |
| 35 3 | 35 True |
| 36 >>> t1[1] | 36 >>> t1[1] |
| 37 (1.500000,3.500000) | 37 (1.500000,3.500000) |
| 38 >>> t1.getTrajectoryInPolygon1([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) | 38 >>> t1.getTrajectoryInPolygon1([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) |
| 39 (0.500000,0.500000) | 39 (0.500000,0.500000) |
| 40 | 40 |
