[−][src]Struct primes::TrialDivision
A prime generator, using the Trial Division method.
Create with let mut pset = TrialDivision::new()
, and then use pset.iter()
to iterate over all
primes.
Methods
impl TrialDivision
[src]
pub fn new() -> TrialDivision
[src]
A new prime generator, primed with 2 and 3
Trait Implementations
impl Clone for TrialDivision
[src]
fn clone(&self) -> TrialDivision
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for TrialDivision
[src]
fn default() -> TrialDivision
[src]
impl Index<usize> for TrialDivision
[src]
impl PrimeSetBasics for TrialDivision
[src]
Auto Trait Implementations
impl RefUnwindSafe for TrialDivision
impl Send for TrialDivision
impl Sync for TrialDivision
impl Unpin for TrialDivision
impl UnwindSafe for TrialDivision
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> PrimeSet for P where
P: PrimeSetBasics,
[src]
P: PrimeSetBasics,
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
ⓘImportant traits for PrimeSetIter<'a, P>fn generator(&mut self) -> PrimeSetIter<Self>
[src]
ⓘImportant traits for PrimeSetIter<'a, P>
ⓘImportant traits for PrimeSetIter<'a, P>fn iter(&mut self) -> PrimeSetIter<Self>
[src]
ⓘImportant traits for PrimeSetIter<'a, P>
fn iter_vec(&self) -> Iter<u64>
[src]
fn find(&mut self, n: u64) -> (usize, u64)
[src]
fn is_prime(&mut self, n: u64) -> bool
[src]
fn find_vec(&self, n: u64) -> Option<(usize, u64)>
[src]
fn get(&mut self, index: usize) -> u64
[src]
fn prime_factors(&mut self, n: u64) -> Vec<u64>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,