max_decomposition_level

Function max_decomposition_level 

pub fn max_decomposition_level(
    signal_length: usize,
    filter_length: usize,
) -> usize
Expand description

Calculate the maximum decomposition level for a signal (DWT with downsampling)

Boundary-agnostic. Uses length /= 2 per step, matching the Periodic / even-N case where output length is N / 2. For odd-N Periodic (output ⌈N/2⌉) and non-Periodic boundaries (PyWavelets- canonical output ⌊(N + L − 1) / 2⌋), this under-counts the reachable levels. Prefer max_decomposition_level_with_boundary when you know the boundary mode — it simulates the actual cascade.