Struct graph_rs::MapGraph
[−]
[src]
pub struct MapGraph<M>(_);
Methods
impl<M> MapGraph<M>
[src]
Trait Implementations
impl<M> From<M> for MapGraph<M>
[src]
impl<'m, N, W, M> DirectedWeightedGraph<'m, N, W> for MapGraph<M> where
M: Map<'m, (N, N), W>,
N: 'm + Eq + Clone,
W: 'm,
[src]
M: Map<'m, (N, N), W>,
N: 'm + Eq + Clone,
W: 'm,
type AllWeightedEdges = Map<M::Iter, fn(_: (&'m (N, N), &'m W)) -> (&'m N, &'m N, &'m W)>
An iterator that iterates over all edges.
type AllWeightedEdgesMut = Map<M::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. Read more
fn all_edges(&'m self) -> Self::AllWeightedEdges
[src]
Returns an iterator over all the edges in this graph.
fn all_edges_mut(&'m mut self) -> Self::AllWeightedEdgesMut
[src]
Returns an iterator over all the ediges in this graph, with mutable access to the weight. Read more
fn add_edge(&'m mut self, source: N, sink: N, weight: W) -> Option<(N, N, W)>
[src]
Adds an edge to this graph.
fn remove_edge(&'m mut self, source: &N, sink: &N) -> Option<(N, N, W)>
[src]
Removes an edge from the graph.
fn edge_weight(&'m self, source: &N, sink: &N) -> Option<&W>
[src]
Gets a borrow to the weight of the requested edge, if it exist. Read more
fn edge_weight_mut(&'m mut self, source: &N, sink: &N) -> Option<&mut W>
[src]
Gets a mutable borrow to the weight of the requested edge, if it exist. Read more
fn has_edge(&'g self, source: &N, sink: &N) -> bool
[src]
Checks if a graph has an edge or not. Read more