pub struct DistanceMap { /* private fields */ }Expand description
Shortest-path distances from every point of a region to the nearest of several targets.
Implementations§
Source§impl DistanceMap
impl DistanceMap
Sourcepub fn graph_vertices(&self) -> usize
pub fn graph_vertices(&self) -> usize
Vertices of the visibility graph.
Sourcepub fn nearest(
&self,
point: Point2,
) -> Result<Result<Reach, Unreachable>, RouteError>
pub fn nearest( &self, point: Point2, ) -> Result<Result<Reach, Unreachable>, RouteError>
The nearest target from point and the route there.
Ok(Err(StartOutside)) for a point outside the region,
Ok(Err(DisconnectedComponents)) for one no target can reach.
§Errors
RouteError for a non-finite point or an undecidable predicate.
Trait Implementations§
Source§impl Clone for DistanceMap
impl Clone for DistanceMap
Source§fn clone(&self) -> DistanceMap
fn clone(&self) -> DistanceMap
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DistanceMap
impl RefUnwindSafe for DistanceMap
impl Send for DistanceMap
impl Sync for DistanceMap
impl Unpin for DistanceMap
impl UnwindSafe for DistanceMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more