mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-08-26 17:31:37 +00:00
No description
- JavaScript 96.9%
- CSS 2.9%
- HTML 0.2%
Replace the per-road-cell Python 8-neighbour scan with a single 3x3 binary dilation of the off-network mask (scipy.ndimage), AND'd with the road/track mask. `border_value=0` treats out-of-bounds neighbours as on-network, matching the scalar version's OOB skip -- NOT np.roll, which would wrap the raster edges and fabricate phantom neighbours. A road cell is never off-network itself, so dilating with the centre included is equivalent to the loop's strict-neighbour test; the surviving cell set and the 2 directed foot<->vehicle tuples per cell are identical (only emission order differs; cap/kernel are order-independent). Synthetic eyeball benchmark (1234x470, dense road block, worst case for the loop's early-break): scalar 843 ms -> vector 9.3 ms; set-equal True. Targets the ~3.75s road_terminus stage of Route B's gather_transition_cells. Adds test_road_terminus_dilation_no_wrap (np.roll regression guard); existing test_road_terminus_transitions_pure_raster + gather/cost parity tests unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| backend | ||
| frontend | ||