Function weighted_forced_walk

Source
pub fn weighted_forced_walk(
    from: &WeightedMap,
    to: &WeightedMap,
    through: &Polygon,
    tolerance: f64,
) -> Result<WeightedForcedWalk, FarthestError>
Expand description

The cheapest walk from an origin of from to a target of to that enters through, where both maps weight travel by the same cost regions (#198): forced_walk for WeightedMaps. Origins’ start weights (see crate::weighted_distance_map_seeded) count.

The cost is bracketed to within tolerance plus what the maps’ own brackets allow at the witness.

§Errors

FarthestError::MismatchedMaps when the maps cover different free space or weight it differently; otherwise as forced_walk.