Learn R Programming

LSWPlib (version 0.1.0)

autoconv: Auto Convolution

Description

autoconv computes the linear convolution of a numeric vector with itself. It is based on the fft function and is twicked to achieve maximum performance.

Usage

autoconv(x)

Arguments

x

a real or complex vector

Value

The linear auto convolution of a given vector with itself, which is equivalent with its inner product.

Details

The speed of calculation for the linear convolution depends upon the number of factors in the number representing the vector length. This implementation maximizes calculation speed for vectors of dyadic length, or lengths with a single factor.

References

A. Cardinali and G.P. Nason (2017). Locally Stationary Wavelet Packet Processes: Basis Selection and Model Fitting. Journal of Time Series Analysis, 38:2, 151-174.

See Also

fft, convolve.

Examples

Run this code
# NOT RUN {
 v <- rnorm(n = 64)
vv <- autoconv(x = v)

# }

Run the code above in your browser using DataLab