[−][src]Trait btree_dag::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_dag::{BTreeDag, AddVertex, AddEdge, Connections}; let mut dag: BTreeDag<String> = BTreeDag::new(); dag.add_vertex(String::from("origin")); dag.add_vertex(String::from("destination")); dag.add_edge(String::from("origin"), String::from("destination")); assert!(dag.connections(String::from("origin")).unwrap().contains(&String::from("destination")));
Required methods
fn connections(&self, x: T) -> Option<&BTreeSet<T>>
[src]
Implementors
impl<T> Connections<T> for BTreeDag<T> where
T: Ord,
[src]
T: Ord,