pub struct MapGraph<M>(/* private fields */);
Implementations§
Trait Implementations§
Source§impl<'m, N, W, M> DirectedWeightedGraph<'m, N, W> for MapGraph<M>
impl<'m, N, W, M> DirectedWeightedGraph<'m, N, W> for MapGraph<M>
Source§type AllWeightedEdges = Map<<M as Map<'m, (N, N), W>>::Iter, fn((&'m (N, N), &'m W)) -> (&'m N, &'m N, &'m W)>
type AllWeightedEdges = Map<<M as Map<'m, (N, N), W>>::Iter, fn((&'m (N, N), &'m W)) -> (&'m N, &'m N, &'m W)>
An iterator that iterates over all edges.
Source§type AllWeightedEdgesMut = Map<<M as Map<'m, (N, N), W>>::IterMut, fn((&'m (N, N), &'m mut W)) -> (&'m N, &'m N, &'m mut W)>
type AllWeightedEdgesMut = Map<<M as Map<'m, (N, N), W>>::IterMut, fn((&'m (N, N), &'m mut W)) -> (&'m N, &'m N, &'m mut W)>
An iterator that iterates over all edges, giving mutable access to the
weight.
Source§fn all_edges(&'m self) -> Self::AllWeightedEdges
fn all_edges(&'m self) -> Self::AllWeightedEdges
Returns an iterator over all the edges in this graph.
Source§fn all_edges_mut(&'m mut self) -> Self::AllWeightedEdgesMut
fn all_edges_mut(&'m mut self) -> Self::AllWeightedEdgesMut
Returns an iterator over all the ediges in this graph, with mutable
access to the weight.
Source§fn add_edge(&'m mut self, source: N, sink: N, weight: W) -> Option<(N, N, W)>
fn add_edge(&'m mut self, source: N, sink: N, weight: W) -> Option<(N, N, W)>
Adds an edge to this graph.
Source§fn remove_edge(&'m mut self, source: &N, sink: &N) -> Option<(N, N, W)>
fn remove_edge(&'m mut self, source: &N, sink: &N) -> Option<(N, N, W)>
Removes an edge from the graph.
Source§fn edge_weight(&'m self, source: &N, sink: &N) -> Option<&W>
fn edge_weight(&'m self, source: &N, sink: &N) -> Option<&W>
Gets a borrow to the weight of the requested edge, if it exist. Read more
Auto Trait Implementations§
impl<M> Freeze for MapGraph<M>where
M: Freeze,
impl<M> RefUnwindSafe for MapGraph<M>where
M: RefUnwindSafe,
impl<M> Send for MapGraph<M>where
M: Send,
impl<M> Sync for MapGraph<M>where
M: Sync,
impl<M> Unpin for MapGraph<M>where
M: Unpin,
impl<M> UnwindSafe for MapGraph<M>where
M: UnwindSafe,
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