pub struct Graph { /* private fields */ }Implementations§
Source§impl Graph
impl Graph
Sourcepub fn new(n: usize) -> Graph
pub fn new(n: usize) -> Graph
Returns a new Graph with the given number of nodes.
§Arguments
nNumber of nodes belonging to the graph.
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Returns the number of nodes.
§Example
let graph = wuf::Graph::new(10);
println!("Number of nodes: {}", graph.count());Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin 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