Struct IterBinomial

struct IterBinomial<T> { ... }

An iterator over binomial coefficients.

Implementations

impl<T> IterBinomial<T>

fn new(n: T) -> IterBinomial<T>

For a given n, iterate over all binomial coefficients binomial(n, k), for k=0...n.

Note that this might overflow, depending on T. For the primitive integer types, the following n are the largest ones for which there will be no overflow:

type n
u8 10
i8 9
u16 18
i16 17
u32 34
i32 33
u64 67
i64 66

For larger n, T should be a bigint type.

impl<I> IntoIterator for IterBinomial<T>

fn into_iter(self: Self) -> I

impl<T> Any for IterBinomial<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for IterBinomial<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for IterBinomial<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> Freeze for IterBinomial<T>

impl<T> From for IterBinomial<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Iterator for IterBinomial<T>

fn next(self: &mut Self) -> Option<T>

impl<T> RefUnwindSafe for IterBinomial<T>

impl<T> Send for IterBinomial<T>

impl<T> Sync for IterBinomial<T>

impl<T> Unpin for IterBinomial<T>

impl<T> UnsafeUnpin for IterBinomial<T>

impl<T> UnwindSafe for IterBinomial<T>

impl<T, U> Into for IterBinomial<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for IterBinomial<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for IterBinomial<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>