code: void forward(double[] a, int n) {
          if (n < ncof) {
              return;
          }
  
          if (n > workspace.length) {
              workspace = new double[n];
          } else {
              Arrays.fill(workspace, 0, n, 0.0);
          }
  
          int nmod = ncof * n;
          int n1 = n - 1;
          int nh = n >> 1;
  
          for (int ii = 0, i = 0; i < n; i += 2, ii++) {
              int ni = i + 1 + nmod + ioff;
              int nj = i + 1 + nmod + joff;
              for (int k = 0; k < ncof; k++) {
                  int jf = n1 & (ni + k + 1);
                  int jr = n1 & (nj + k + 1);
                  workspace[ii] += cc[k] * a[jf];
                  workspace[ii + nh] += cr[k] * a[jr];
              }
          }
  
          System.arraycopy(workspace, 0, a, 0, n);
      }
docs: Applies the wavelet filter to a data vector a[0, n-1].