33 double coeff = M_PI / (4. * bw);
35 for (
int i = 0; i < 2 * bw; ++i) {
37 double k = 2. * i + 1.;
39 for (
int j = 0; j < bw; ++j)
40 sum += 1. / (2. * j + 1.) * sin(k * (2. * j + 1.) * coeff);
42 sum *= 2. * sin(k * coeff) / bw;
45 weights[i + 2 * bw] = sum * sin(k * coeff);