pub struct UndirectedGraph { /* private fields */ }Expand description
An undirected graph.
Implementations§
Source§impl UndirectedGraph
impl UndirectedGraph
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
pub fn has_edge(&self, v: usize, w: usize) -> bool
Check if there is an edge between vertices v and w.
Sourcepub fn neighbors_of(&self, v: usize) -> &Vec<usize>
pub fn neighbors_of(&self, v: usize) -> &Vec<usize>
Return a reference to the adjacency list of vertex v.
Trait Implementations§
Source§impl Clone for UndirectedGraph
impl Clone for UndirectedGraph
Source§fn clone(&self) -> UndirectedGraph
fn clone(&self) -> UndirectedGraph
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 Freeze for UndirectedGraph
impl RefUnwindSafe for UndirectedGraph
impl Send for UndirectedGraph
impl Sync for UndirectedGraph
impl Unpin for UndirectedGraph
impl UnsafeUnpin for UndirectedGraph
impl UnwindSafe for UndirectedGraph
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