[−][src]Trait btree_graph::GetVertexValue
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));
Required methods
pub fn get_vertex_value(&self, x: V) -> Option<&BTreeSet<E>>
[src]
Implementors
impl<V, E> GetVertexValue<V, E> for BTreeGraph<V, E> where
V: Ord,
E: Ord,
[src]
V: Ord,
E: Ord,