Function weighted_distance_map_seeded

Source
pub fn weighted_distance_map_seeded(
    region: &[Polygon],
    barriers: &[Vec<Point2>],
    targets: &[(Point2, f64)],
    costs: &[CostRegion],
    spacing: f64,
) -> Result<WeightedMap, MapError>
Expand description

A weighted distance map whose targets each start at their own cost: the distance from a point is the least, over targets, of the weighted cost of a walk to the target plus the target’s weight (#198), as crate::distance_map_weighted is for plain maps. With every weight zero it is weighted_distance_map.

§Errors

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