| 117 | } |
| 118 | |
| 119 | void |
| 120 | SNREstimator::calculateSquareError(void) |
| 121 | { |
| 122 | if (this->length && this->intervals > 0) { |
| 123 | float err; |
| 124 | this->sqerr = 0; |
| 125 | for (unsigned i = 0; i < this->length; ++i) { |
| 126 | err = (this->Hi[i] - this->Htilde[i]) * (this->Hi[i] - this->Htilde[i]); |
| 127 | this->sqerr += err * err; |
| 128 | } |
| 129 | |
| 130 | this->dirty = false; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | void |
| 135 | SNREstimator::setBps(unsigned int bps) |