Module rgsl::wavelet_transforms::one_dimension[][src]

Expand description

These functions compute in-place forward and inverse discrete wavelet transforms of length n with stride stride on the array data. The length of the transform n is restricted to powers of two. For the transform version of the function the argument dir can be either forward (+1) or backward (-1). A workspace work of length n must be provided.

For the forward transform, the elements of the original array are replaced by the discrete wavelet transform f_i -> w_{j,k} in a packed triangular storage layout, where j is the index of the level j = 0 … J-1 and k is the index of the coefficient within each level, k = 0 … (2^j)-1. The total number of levels is J = \log_2(n). The output data has the following form,

(s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0}, …, d_{j,k}, …, d_{J-1,2^{J-1}-1}) where the first element is the smoothing coefficient s_{-1,0}, followed by the detail coefficients d_{j,k} for each level j. The backward transform inverts these coefficients to obtain the original data.

These functions return a status of ::Value::Success upon successful completion. ::Inval is returned if n is not an integer power of 2 or if insufficient workspace is provided.

Functions