(cluster, radius, time_threshold)
| 114 | return clusters |
| 115 | |
| 116 | def test(cluster, radius, time_threshold): |
| 117 | assert cluster.max_time - cluster.min_time <= time_threshold |
| 118 | |
| 119 | for p in cluster: |
| 120 | assert utils.distance(p.position, cluster.centroid) <= radius |
| 121 | assert cluster.min_time <= p.time <= cluster.max_time |
| 122 | |
| 123 | def main(args): |
| 124 | radius = args.radius |