pub struct Graph {
pub node_vec: Vec<String>,
pub node_idx: HashMap<String, usize>,
pub out_adj: Vec<HashSet<usize>>,
pub in_adj: Vec<HashSet<usize>>,
}Fields§
§node_vec: Vec<String>§node_idx: HashMap<String, usize>§out_adj: Vec<HashSet<usize>>§in_adj: Vec<HashSet<usize>>Implementations§
Source§impl Graph
impl Graph
pub fn node_count(&self) -> usize
pub fn edge_count(&self) -> usize
pub fn ensure_nodes(&mut self, names: &[String])
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more