pub struct Graph<T: VtxTrait> { /* private fields */ }
Implementations
sourceimpl<T: VtxTrait> Graph<T>
impl<T: VtxTrait> Graph<T>
pub fn new() -> Graph<T>
pub fn iter<'a>(&'a self) -> GraphIter<'a, T>ⓘNotable traits for GraphIter<'a, T>impl<'a, T: VtxTrait> Iterator for GraphIter<'a, T> type Item = &'a Vertex<T>;
pub fn add_vtx(&mut self, ind: u64, v: T)
pub fn num_vtxs(&self) -> usize
pub fn get_vtx(&self, ind: usize) -> &Vertex<T>
pub fn set_vtx(&mut self, ind: usize, new_v: Vertex<T>)
pub fn add_edge(&mut self, ind: u64, nei: u64)
pub fn has_edge(&mut self, ind: u64, nei: u64) -> bool
pub fn print(&self)
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Graph<T> where
T: RefUnwindSafe,
impl<T> Send for Graph<T> where
T: Send,
impl<T> Sync for Graph<T> where
T: Sync,
impl<T> Unpin for Graph<T>
impl<T> UnwindSafe for Graph<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more