pub struct EdgeAttributedDirectedGraph<Attr: Copy + Clone + Default> { /* private fields */ }Expand description
An edge-attributed directed graph.
Implementations§
Source§impl<Attr: Copy + Clone + Default> EdgeAttributedDirectedGraph<Attr>
impl<Attr: Copy + Clone + Default> EdgeAttributedDirectedGraph<Attr>
Sourcepub fn add_edge(&mut self, v: usize, w: usize, attr: Attr)
pub fn add_edge(&mut self, v: usize, w: usize, attr: Attr)
Add an edge from vertex v to vertex w, with a specified attribute.
Sourcepub fn delete_edge(&mut self, v: usize, w: usize)
pub fn delete_edge(&mut self, v: usize, w: usize)
Remove the edge from vertex v to vertex w.
Sourcepub fn has_edge(&self, v: usize, w: usize) -> (bool, Attr)
pub fn has_edge(&self, v: usize, w: usize) -> (bool, Attr)
Check if there is an edge from vertex v to vertex w.
Sourcepub fn neighbors_of(&self, v: usize) -> &Vec<(usize, Attr)>
pub fn neighbors_of(&self, v: usize) -> &Vec<(usize, Attr)>
Return a reference to the adjacency list of vertex v.
Trait Implementations§
Source§impl<Attr: Clone + Copy + Clone + Default> Clone for EdgeAttributedDirectedGraph<Attr>
impl<Attr: Clone + Copy + Clone + Default> Clone for EdgeAttributedDirectedGraph<Attr>
Source§fn clone(&self) -> EdgeAttributedDirectedGraph<Attr>
fn clone(&self) -> EdgeAttributedDirectedGraph<Attr>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Attr> Freeze for EdgeAttributedDirectedGraph<Attr>
impl<Attr> RefUnwindSafe for EdgeAttributedDirectedGraph<Attr>where
Attr: RefUnwindSafe,
impl<Attr> Send for EdgeAttributedDirectedGraph<Attr>where
Attr: Send,
impl<Attr> Sync for EdgeAttributedDirectedGraph<Attr>where
Attr: Sync,
impl<Attr> Unpin for EdgeAttributedDirectedGraph<Attr>where
Attr: Unpin,
impl<Attr> UnsafeUnpin for EdgeAttributedDirectedGraph<Attr>
impl<Attr> UnwindSafe for EdgeAttributedDirectedGraph<Attr>where
Attr: UnwindSafe,
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