pub struct EdgeAttributedUndirectedGraph<Attr: Copy + Clone + Default> { /* private fields */ }Expand description
An edge-attributed undirected graph.
Implementations§
Source§impl<Attr: Copy + Clone + Default> EdgeAttributedUndirectedGraph<Attr>
impl<Attr: Copy + Clone + Default> EdgeAttributedUndirectedGraph<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 between vertices v and w, with a specified weight.
Sourcepub fn delete_edge(&mut self, v: usize, w: usize)
pub fn delete_edge(&mut self, v: usize, w: usize)
Remove the edge between vertices v and 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 between vertices v and 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 EdgeAttributedUndirectedGraph<Attr>
impl<Attr: Clone + Copy + Clone + Default> Clone for EdgeAttributedUndirectedGraph<Attr>
Source§fn clone(&self) -> EdgeAttributedUndirectedGraph<Attr>
fn clone(&self) -> EdgeAttributedUndirectedGraph<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 EdgeAttributedUndirectedGraph<Attr>
impl<Attr> RefUnwindSafe for EdgeAttributedUndirectedGraph<Attr>where
Attr: RefUnwindSafe,
impl<Attr> Send for EdgeAttributedUndirectedGraph<Attr>where
Attr: Send,
impl<Attr> Sync for EdgeAttributedUndirectedGraph<Attr>where
Attr: Sync,
impl<Attr> Unpin for EdgeAttributedUndirectedGraph<Attr>where
Attr: Unpin,
impl<Attr> UnsafeUnpin for EdgeAttributedUndirectedGraph<Attr>
impl<Attr> UnwindSafe for EdgeAttributedUndirectedGraph<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