FA-91425 / Digital signal filters / Member archive
Centered average accepts an even window · case 05
K = 2 silently produces a three-sample window instead of "bad-window".
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: even window | ["3/2", "2", "5/2"] | "bad-window" | 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 ↗