public void inverse() {
    int n = data.length;

    if (!isPower2(n)) {
      throw new IllegalArgumentException("The data vector size is not a power of 2.");
    }

    if (n < ncof) {
      throw new IllegalArgumentException(
          "The data vector size is less than wavelet coefficient size.");
    }
    int nn = n;
    for (int i = 0; i < layer - 1; i++) {
      nn = n / 2;
    }
    for (int i = 0; i < layer; i++) {
      if (nn > n) {
        break;
      }
      backward(nn);
      n <<= 1;
    }
  }
Inverse discrete wavelet transform. Input series has been transformed to the highest possible
layer, which means there is 1 number in the last layer. To alter this, you may refer to
waveletTransform()
library-udf/src/main/java/org/apache/iotdb/library/frequency/util/DWTUtil.java