FA-91418 / Digital signal filters / Member archive
Centered average drops zero padding from the divisor · case 03
In zero mode the edge outputs equal the shrink-mode averages instead of being pulled toward zero.
Case contract
Input [K, mode, samples]; K must be odd ("bad-window"). Centered moving average over indices i-K//2..i+K//2 with edge mode "shrink" (average available samples), "zero" (missing samples count as 0, divide by K), "replicate" (clamp index) or "reflect" (mirror without repeating the edge: -1 -> 1, n -> n-2). Return exact fraction strings.
Why this case matters
Offline smoothing needs explicit edge handling; mirror and padding conventions differ between tools and are easy to mix up.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random centered 0 | ["5/2", "13/3", "7/2"] | ["5/3", "13/3", "7/3"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗