[−][src]Trait btree_graph::Connections
Connections
lists all vertices y such that there is an edge from the vertex x to
the vertex y. An error is thrown if x does not exist.
Example
use btree_graph::{BTreeGraph, AddVertex, AddEdge, Connections}; let mut graph: BTreeGraph<String, usize> = BTreeGraph::new(); graph.add_vertex(String::from("origin")); graph.add_vertex(String::from("destination")); graph.add_edge(String::from("origin"), String::from("destination"), 10); assert!(graph.connections(String::from("origin")).unwrap().contains(&String::from("destination")));
Associated Types
Loading content...Required methods
pub fn connections(&self, x: T) -> Result<BTreeSet<&T>, Self::Error>
[src]
Implementors
impl<V, E> Connections<V> for BTreeGraph<V, E> where
V: Ord,
E: Ord,
[src]
V: Ord,
E: Ord,