pub struct RandomGraphGenerator { /* private fields */ }Implementations§
Source§impl RandomGraphGenerator
impl RandomGraphGenerator
pub const fn new(seed: u64) -> Self
Sourcepub fn directed(
&mut self,
node_count: usize,
numerator: u64,
denominator: u64,
) -> Result<Topology>
pub fn directed( &mut self, node_count: usize, numerator: u64, denominator: u64, ) -> Result<Topology>
Generates a directed Erdos-Renyi graph without self-loops.
§Errors
Returns an error for an invalid probability or compact capacity overflow.
Sourcepub fn undirected(
&mut self,
node_count: usize,
numerator: u64,
denominator: u64,
) -> Result<UndirectedTopology>
pub fn undirected( &mut self, node_count: usize, numerator: u64, denominator: u64, ) -> Result<UndirectedTopology>
Generates an undirected Erdos-Renyi graph without self-loops.
§Errors
Returns an error for an invalid probability or compact capacity overflow.
Trait Implementations§
Source§impl Clone for RandomGraphGenerator
impl Clone for RandomGraphGenerator
Source§fn clone(&self) -> RandomGraphGenerator
fn clone(&self) -> RandomGraphGenerator
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 moreimpl Copy for RandomGraphGenerator
Source§impl Debug for RandomGraphGenerator
impl Debug for RandomGraphGenerator
impl Eq for RandomGraphGenerator
Source§impl PartialEq for RandomGraphGenerator
impl PartialEq for RandomGraphGenerator
impl StructuralPartialEq for RandomGraphGenerator
Auto Trait Implementations§
impl Freeze for RandomGraphGenerator
impl RefUnwindSafe for RandomGraphGenerator
impl Send for RandomGraphGenerator
impl Sync for RandomGraphGenerator
impl Unpin for RandomGraphGenerator
impl UnsafeUnpin for RandomGraphGenerator
impl UnwindSafe for RandomGraphGenerator
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