Skip to main content

integer_partition_count_checked

Function integer_partition_count_checked 

Source
pub fn integer_partition_count_checked(n: u64) -> Result<BigUint, CombError>
Expand description

p(n) with an explicit input ceiling (MAX_PARTITION_INPUT).

Returns CombError::LimitExceeded for n beyond the cap, so an untrusted n cannot drive an unbounded allocation or O(n^2) recurrence.