MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ moving_average_weights()

MAYAFLUX_API std::vector< double > MayaFlux::Kinesis::Discrete::moving_average_weights ( size_t  count)

Equal weights summing to 1: Taper::rectangular scaled by 1 / count.

Definition at line 205 of file Coefficients.cpp.

206{
207 if (count == 0)
208 return {};
209
210 auto weights = rectangular(count);
211 const double each = 1.0 / static_cast<double>(count);
212 for (double& w : weights)
213 w *= each;
214 return weights;
215}
size_t count

References count, and rectangular().

+ Here is the call graph for this function: