flopscope.

flopscope.accounting.blackman_cost

flopscope.accounting.blackman_cost(n)[flopscope source]

Weighted FLOP cost of Blackman window generation.

Parameters

n:int

Number of columns in the input matrix.

Returns

:int

Weighted public cost estimate, floored to match runtime accounting.

Notes

This helper multiplies the analytical FLOP count by the active weight from flopscope._weights and then applies int(...) so public estimates match budget deductions.

numpy's blackman: 0.42 + 0.5*cos(pi*n/(M-1)) + 0.08*cos(2*pi*n/(M-1)) — exactly two cosine evals per element. Weight 1.0 (constant in flop_cost per composite-kernel tier policy).