pub trait GetVertexValue<V, E>where
E: Ord,{
// Required method
fn get_vertex_value(&self, x: V) -> Option<&BTreeSet<E>>;
}Expand description
GetVertexValue returns the value associated with the vertex x.
§Example
extern crate alloc;
use alloc::collections::btree_set::BTreeSet;
use btree_graph::{BTreeGraph, AddVertex, AddEdge, GetEdgeValue, GetVertexValue};
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);
let vertex_value: &BTreeSet<usize> = graph.get_vertex_value(String::from("origin")).unwrap();
assert!(vertex_value.contains(&10));