pub struct SmallPrimesSieveFactory<T> { /* private fields */ }Expand description
A sieve returning numbers that are not multiples of a set of small factors.
Implementations§
Source§impl<T: Integer + RandomBits> SmallPrimesSieveFactory<T>
impl<T: Integer + RandomBits> SmallPrimesSieveFactory<T>
Sourcepub fn new(max_bit_length: u32, set_bits: SetBits) -> Self
pub fn new(max_bit_length: u32, set_bits: SetBits) -> Self
Creates a factory that produces sieves returning numbers of max_bit_length bits (with the top bit set)
that are not divisible by a number of small factors.
Sourcepub fn new_safe_primes(max_bit_length: u32, set_bits: SetBits) -> Self
pub fn new_safe_primes(max_bit_length: u32, set_bits: SetBits) -> Self
Creates a factory that produces sieves returning numbers n of max_bit_length bits (with the top bit set)
such that neither n nor (n - 1) / 2 are divisible by a number of small factors.
Trait Implementations§
Source§impl<T: Clone> Clone for SmallPrimesSieveFactory<T>
impl<T: Clone> Clone for SmallPrimesSieveFactory<T>
Source§fn clone(&self) -> SmallPrimesSieveFactory<T>
fn clone(&self) -> SmallPrimesSieveFactory<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for SmallPrimesSieveFactory<T>
impl<T: Debug> Debug for SmallPrimesSieveFactory<T>
Source§impl<T: Integer + RandomBits> SieveFactory for SmallPrimesSieveFactory<T>
impl<T: Integer + RandomBits> SieveFactory for SmallPrimesSieveFactory<T>
Source§type Sieve = SmallPrimesSieve<T>
type Sieve = SmallPrimesSieve<T>
The resulting sieve.
Source§fn make_sieve(
&mut self,
rng: &mut (impl CryptoRngCore + ?Sized),
_previous_sieve: Option<&Self::Sieve>,
) -> Option<Self::Sieve>
fn make_sieve( &mut self, rng: &mut (impl CryptoRngCore + ?Sized), _previous_sieve: Option<&Self::Sieve>, ) -> Option<Self::Sieve>
Makes a sieve given an RNG and the previous exhausted sieve (if any). Read more
impl<T: Copy> Copy for SmallPrimesSieveFactory<T>
Auto Trait Implementations§
impl<T> Freeze for SmallPrimesSieveFactory<T>
impl<T> RefUnwindSafe for SmallPrimesSieveFactory<T>where
T: RefUnwindSafe,
impl<T> Send for SmallPrimesSieveFactory<T>where
T: Send,
impl<T> Sync for SmallPrimesSieveFactory<T>where
T: Sync,
impl<T> Unpin for SmallPrimesSieveFactory<T>where
T: Unpin,
impl<T> UnwindSafe for SmallPrimesSieveFactory<T>where
T: 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