| 67 | } |
| 68 | |
| 69 | void printTriangular() |
| 70 | { |
| 71 | WeightFunction weights(WEIGHT_TRIANGULAR); |
| 72 | vector<float> data(SAMPLES); |
| 73 | |
| 74 | ofstream outputFile("data_triangular.dat"); |
| 75 | weights_triangle(data.data(), SAMPLES); |
| 76 | for (size_t idx = 0; idx < SAMPLES; ++idx) |
| 77 | { |
| 78 | float w = weights.getWeight(((float)idx)/SAMPLES); |
| 79 | |
| 80 | outputFile << idx << " " << data[idx] << " " |
| 81 | << w << " " << abs(data[idx] - w) |
| 82 | << "\n"; |
| 83 | } |
| 84 | outputFile.close(); |
| 85 | } |
| 86 | |
| 87 | void printGaussian() |
| 88 | { |
no test coverage detected