|
#define BASIS_SHIFT (0.5 - sqrt(1.0 / 12.0)) void ShiftedBasisCoefficients1D ( double c[], /* in-place processing; 1D array */ long DataLength /* length of the 1D array */ ) { /* begin ShiftedBasisCoefficients1D */ double Factor = 1.0 / (1.0 - BASIS_SHIFT); double Pole = BASIS_SHIFT / (BASIS_SHIFT - 1.0); long n; /* causal recursion */ for (n = 1L; n < DataLength; n++) c[n] = Factor * c[n] + Pole * c[n - 1L]; } /* end ShiftedBasisCoefficients1D */