Skip to main content

BellNumber

Trait BellNumber 

Source
pub trait BellNumber {
    // Required method
    fn bell_number(n: u64) -> Self;
}
Expand description

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

Required Methods§

Source

fn bell_number(n: u64) -> Self

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 BellNumber for u8

Source§

fn bell_number(n: u64) -> u8

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Source§

impl BellNumber for u16

Source§

fn bell_number(n: u64) -> u16

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Source§

impl BellNumber for u32

Source§

fn bell_number(n: u64) -> u32

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Source§

impl BellNumber for u64

Source§

fn bell_number(n: u64) -> u64

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Source§

impl BellNumber for u128

Source§

fn bell_number(n: u64) -> u128

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Source§

impl BellNumber for usize

Source§

fn bell_number(n: u64) -> Self

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

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if the result is too large to be represented.

§Examples

See here.

Implementors§