Function shortest_path_within

Source
pub fn shortest_path_within(
    region: &[Polygon],
    barriers: &[Vec<DVec2>],
    start: DVec2,
    goal: DVec2,
    budget: usize,
) -> Result<Result<Route, Unreachable>, RouteError>
Expand description

shortest_path with a caller-chosen vertex budget.

The right cap depends on the caller’s time budget, not on the kernel: construction is quadratic in vertices and cubic to verify, so what is affordable is a property of the deadline, not of the geometry (kernel#92). MAX_VERTICES remains the default for shortest_path.

Raising the budget does not change any answer, only which inputs are affordable. Over-budget input is still REFUSED rather than truncated, but the refusal carries a proven lower bound.