Skip to main content

CheckedBellNumber

Trait CheckedBellNumber 

Source
pub trait CheckedBellNumber: Sized {
    // Required method
    fn checked_bell_number(n: u64) -> Option<Self>;
}
Expand description

Computes the $n$th Bell number, returning None if the result is too large to be represented.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CheckedBellNumber for u8

Source§

fn checked_bell_number(n: u64) -> Option<u8>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl CheckedBellNumber for u16

Source§

fn checked_bell_number(n: u64) -> Option<u16>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl CheckedBellNumber for u32

Source§

fn checked_bell_number(n: u64) -> Option<u32>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl CheckedBellNumber for u64

Source§

fn checked_bell_number(n: u64) -> Option<u64>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl CheckedBellNumber for u128

Source§

fn checked_bell_number(n: u64) -> Option<u128>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl CheckedBellNumber for usize

Source§

fn checked_bell_number(n: u64) -> Option<Self>

Computes the $n$th Bell number: the number of ways to partition a set of $n$ elements.

If the result is too large to be represented, the function returns None.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§