Skip to main content

min_plus_convolution_sparse

Function min_plus_convolution_sparse 

Source
pub fn min_plus_convolution_sparse<T>(a: &[T], b: &[T]) -> Vec<T>
where T: Signed,
Expand description

Computes min-plus convolution by enumerating finite input pairs only.

If the inputs have s_a and s_b finite values, the running time is O(s_a * s_b + n + m).

§Panics

Panics if the output length does not fit usize. Arithmetic overflow is the caller’s responsibility.