pub struct SegmentedSieve<G: GenPrime = BitwiseSieve> { /* private fields */ }Expand description
Implementation of the Segmented sieve.
§Examples
let mut segmented_sieve = SegmentedSieve::new(BitwiseSieve::new());
assert_eq!(segmented_sieve.gen_range(0..10), vec![2, 3, 5, 7]);Implementations§
Trait Implementations§
Source§impl<G: Clone + GenPrime> Clone for SegmentedSieve<G>
impl<G: Clone + GenPrime> Clone for SegmentedSieve<G>
Source§fn clone(&self) -> SegmentedSieve<G>
fn clone(&self) -> SegmentedSieve<G>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<G: Default + GenPrime> Default for SegmentedSieve<G>
impl<G: Default + GenPrime> Default for SegmentedSieve<G>
Source§fn default() -> SegmentedSieve<G>
fn default() -> SegmentedSieve<G>
Returns the “default value” for a type. Read more
Source§impl<G: GenPrime> GenPrime for SegmentedSieve<G>
impl<G: GenPrime> GenPrime for SegmentedSieve<G>
impl<G: Eq + GenPrime> Eq for SegmentedSieve<G>
impl<G: GenPrime> StructuralPartialEq for SegmentedSieve<G>
Auto Trait Implementations§
impl<G> Freeze for SegmentedSieve<G>where
G: Freeze,
impl<G> RefUnwindSafe for SegmentedSieve<G>where
G: RefUnwindSafe,
impl<G> Send for SegmentedSieve<G>where
G: Send,
impl<G> Sync for SegmentedSieve<G>where
G: Sync,
impl<G> Unpin for SegmentedSieve<G>where
G: Unpin,
impl<G> UnwindSafe for SegmentedSieve<G>where
G: 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