Skip to main content

hyper_catalan

Function hyper_catalan 

Source
pub fn hyper_catalan(m: &TypeVector) -> Result<u128, GeodeError>
Expand description

Returns the finite-type hyper-Catalan coefficient for m.

ยงErrors

Returns GeodeError::ArithmeticOverflow when structural counts or factorials exceed the exact integer range.

Returns GeodeError::DivisionNotExact when the closed form does not divide exactly in u128 arithmetic.

Examples found in repository?
examples/facade_geode.rs (line 6)
3fn main() -> Result<(), use_math::GeodeError> {
4    let vector = TypeVector::new(vec![0, 1])?;
5
6    assert_eq!(hyper_catalan(&vector)?, 1);
7    assert_eq!(geode_memoized(&vector)?, 3);
8
9    Ok(())
10}