[][src]Struct sfcpl::prime::sieve::Sieve

pub struct Sieve { /* fields omitted */ }

初期化の際にだけエラストテネスの篩を使って素数のリストを生成

O(n)

Implementations

impl Sieve[src]

pub fn new(n: usize) -> Self[src]

初期化、サイズが重要

pub fn size(&self) -> usize[src]

自分自身の素数リストの有効な範囲

pub fn primes(&self, n: usize) -> Vec<usize>[src]

n以下の全ての素数のリストを作る

pub fn is_prime(&self, n: usize) -> bool[src]

nが素数かどうか

Panic

n > self.sizeでindexing panicする

Auto Trait Implementations

impl RefUnwindSafe for Sieve

impl Send for Sieve

impl Sync for Sieve

impl Unpin for Sieve

impl UnwindSafe for Sieve

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,