### ENH: add more explanation for the comparaison and remove unused and untested method

parent a6895c9a
 ... ... @@ -157,18 +157,6 @@ protected: */ void RevertFilter(CoefficientVector& coeff); /** * Performs the definition of high pass filter in an orthogonal framework * It follows conjugate quadrature filter (CQF) of the chapter 5 of * "Ten Lecture on Wavelets", of Ingrid Daubechies, * Society for Industrial and Applied Mathematics, 1992. * * It defines filter coefficients as \f\$ G(z) = - z H(-z^{-1}) \f\$. * According to Daubechies'notation, it concerns the synthesis (Inverse) * part of the filter banc. */ void GenerateForwardHighPassFilterFromLowPassFilter(CoefficientVector& coeff); /** * Performs the definition of high pass filter in an orthogonal framework * It follows conjugate quadrature filter (CQF) of the chapter 5 of ... ...
 ... ... @@ -89,37 +89,6 @@ WaveletOperatorBase coeff = newCoeff; } template void WaveletOperatorBase ::GenerateForwardHighPassFilterFromLowPassFilter(CoefficientVector& coeff) { const unsigned int length = coeff.size(); //const unsigned int medianPosition = length / 2; CoefficientVector highPassCoeff(length + 2); highPassCoeff = 0.; highPassCoeff = 0.; double sign = -1; //(medianPosition&1)==1 ? -1. : 1.; for (unsigned int i = 0; i < length; i++) { highPassCoeff[i + 2] = sign * coeff[length - 1 - i]; sign *= -1.; } //highPassCoeff[length] = 0.; //highPassCoeff[length+1] = 0.; coeff = highPassCoeff; while (coeff == coeff[coeff.size() - 1]) { ReduceFilterLength(coeff); } } template void ... ... @@ -141,6 +110,8 @@ WaveletOperatorBase coeff = highPassCoeff; // Note that the 0.0 value is obtained by affectation and not by // computation. It is fine to do an == comparison while ((coeff == coeff[coeff.size() - 1]) && (coeff == 0.0)) { ReduceFilterLength(coeff); ... ... @@ -168,6 +139,8 @@ WaveletOperatorBase coeff = highPassCoeff; // Note that the 0.0 value is obtained by affectation and not by // computation. It is fine to do an == comparison while ((coeff == coeff[coeff.size() - 1]) && (coeff == 0.0)) { assert(coeff.size() > 1); ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment