Skip to content
Symi Docs
Rust

The Rust manual covers the recommended facade. The complete native crate is documented in the native Rust API reference.

On this page

Combinatorics

Same convention as integer number theory: integer-leaf expressions in, integer-leaf expressions out; non-integer input raises, as do arguments outside each function's domain (negative counts, …).

falling_factorial#

api::Session method

pub fn falling_factorial(
    &self,
    value: &Expression,
    order: &Expression,
) -> Result<Expression, ApiError>

base⁡(base⁡−1)⋯(base⁡−length⁡+1)\operatorname{base}(\operatorname{base}-1)\cdots(\operatorname{base}-\operatorname{length}+1); length must be a non-negative integer, base may be any integer.

rising_factorial#

api::Session method

pub fn rising_factorial(
    &self,
    value: &Expression,
    order: &Expression,
) -> Result<Expression, ApiError>

base⁡(base⁡+1)⋯(base⁡+length⁡−1)\operatorname{base}(\operatorname{base}+1)\cdots(\operatorname{base}+\operatorname{length}-1) (the Pochhammer symbol on integers).

stirling_first_signed#

api::Session method

pub fn stirling_first_signed(
    &self,
    upper: &Expression,
    lower: &Expression,
) -> Result<Expression, ApiError>

Signed Stirling number of the first kind s(n, k).

stirling_second#

api::Session method

pub fn stirling_second(
    &self,
    upper: &Expression,
    lower: &Expression,
) -> Result<Expression, ApiError>

Stirling number of the second kind S(n, k).

bell_number#

api::Session method

pub fn bell_number(
    &self,
    argument: &Expression,
) -> Result<Expression, ApiError>

The n-th Bell number.

catalan_number#

api::Session method

pub fn catalan_number(
    &self,
    argument: &Expression,
) -> Result<Expression, ApiError>

The n-th Catalan number.

fibonacci_number#

api::Session method

pub fn fibonacci_number(
    &self,
    argument: &Expression,
) -> Result<Expression, ApiError>

The n-th Fibonacci number (F(0) = 0, F(1) = 1).

partition_count#

api::Session method

pub fn partition_count(
    &self,
    argument: &Expression,
) -> Result<Expression, ApiError>

Number of integer partitions p(n).

multinomial#

api::number_theory::Session method

pub fn multinomial(
    &self,
    parts: &[Expression],
) -> Result<Expression, ApiError>

Multinomial coefficient (∑parts⁡)!/∏(part⁡i!)(\sum \operatorname{parts})! / \prod (\operatorname{part}_i!); parts must be non-negative integers.

Example#

This family is not part of the recommended symi::api facade in this release. Call it through the native modules in the native Rust API reference.