53 if (&w ==
this)
return *
this;
61 void cut(T *src)
const {
cut(src, src); }
62 void cut(
const T *src, T *dst)
const {
63 for (
int i = 0; i <
m_size; ++i) dst[i] = src[i] *
m_cache[i];
71 for (
int i = 0; i <
m_size; ++i) {
91 for (i = 0; i < n; ++i) mult[i] = 1.0;
96 for (i = 0; i < n; ++i) {
97 mult[i] = mult[i] * 0.5;
103 mult[0] = mult[1] = 0;
106 mult[1] = mult[2] = 2./3.;
108 for (i = 0; i < n/2; ++i) {
109 mult[i] = mult[i] * (i / T(n/2));
110 mult[i + n - n/2] = mult[i + n - n/2] * (1.0 - (i / T(n/2)));
117 for (i = 0; i < n; ++i) {
118 mult[i] = mult[i] * (0.54 - 0.46 * cos(2 * M_PI * i / n));
125 for (i = 0; i < n; ++i) {
126 mult[i] = mult[i] * (0.50 - 0.50 * cos(2 * M_PI * i / n));
133 for (i = 0; i < n; ++i) {
134 mult[i] = mult[i] * (0.42 - 0.50 * cos(2 * M_PI * i / n)
135 + 0.08 * cos(4 * M_PI * i / n));
142 for (i = 0; i < n; ++i) {
143 mult[i] = mult[i] * (0.35875
144 - 0.48829 * cos(2 * M_PI * i / n)
145 + 0.14128 * cos(4 * M_PI * i / n)
146 - 0.01168 * cos(6 * M_PI * i / n));
WindowType getType() const
Window & operator=(const Window &w)
Window(WindowType type, int size)
std::vector< T > getWindowData() const
void cut(const T *src, T *dst) const