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/basic_usage.rs (line 7)
3fn main() -> Result<(), use_geode::GeodeError> {
4    let vector = TypeVector::new(vec![0, 1])?;
5
6    assert_eq!(polygon_edge_count(&vector)?, 4);
7    assert_eq!(hyper_catalan(&vector)?, 1);
8    assert_eq!(geode_memoized(&vector)?, 3);
9
10    Ok(())
11}