[−][src]Trait generic_graph::DirectedGraph
This trait define the behaviour of a directed graph it requires the for vertexes (T), edges (E), vertex's keys (K), vertex's values (v), edge's weights (W) and edge's keys (C)
Required methods
fn adjacent(&self, from: &K, to: &K) -> bool
This method returns a boolean stating if exist an edge from the first vertex to the other
fn neighbors(&self, from: &K) -> Vec<&K>
This method returns a vector containing the keys of all the vertexes reached by edges starting from the argument
fn leading_to(&self, to: &K) -> Vec<&K>
This method returns a vector containing the keys of all the vertexes with by edges leading to the argument
fn get_vertex(&self, key: &K) -> Option<&T>
fn get_mutable_vertex(&mut self, key: &K) -> Option<&mut T>
fn get_edge(&self, pair: (&K, &K)) -> Option<&E>
fn get_mutable_edge(&mut self, pair: (&K, &K)) -> Option<&mut E>
Implementors
impl<K: Hash + Eq + Clone, V, W: Add + Sub + Eq + Ord + Copy> DirectedGraph<SimpleVertex<K, V>, DirectedEdge<K, W>, K, V, W, CompoundKey<K>> for AdjacencyGraph<K, V, W>
[src]
fn adjacent(&self, from: &K, to: &K) -> bool
[src]
fn neighbors(&self, from: &K) -> Vec<&K>
[src]
fn leading_to(&self, to: &K) -> Vec<&K>
[src]
fn get_vertex(&self, key: &K) -> Option<&SimpleVertex<K, V>>
[src]
fn get_mutable_vertex(&mut self, key: &K) -> Option<&mut SimpleVertex<K, V>>
[src]
fn get_edge(&self, pair: (&K, &K)) -> Option<&DirectedEdge<K, W>>
[src]
fn get_mutable_edge(
&mut self,
pair: (&K, &K)
) -> Option<&mut DirectedEdge<K, W>>
[src]
&mut self,
pair: (&K, &K)
) -> Option<&mut DirectedEdge<K, W>>