Function distance_map_weighted

Source
pub fn distance_map_weighted(
    region: &[Polygon],
    barriers: &[Vec<Point2>],
    targets: &[(Point2, f64)],
) -> Result<DistanceMap, MapError>
Expand description

A distance map whose targets each start at their own distance: the distance from a point is the least, over targets, of the route’s length to the target plus the target’s weight (#197). For a way out that carries the rest of a walk beyond it, such as a stair landing. With every weight zero it is distance_map.

§Errors

As distance_map, and MapError::InvalidWeight for a weight that is negative or not finite.