

   FFaasstt CCoonnvvoolluuttiioonn

        convolve(x, y, conj = TRUE)

   AArrgguummeennttss::

        x,y: numeric sequences of the same length to be con-
             volved.

   VVaalluuee::

        This function uses the Fast Fourier Transform to com-
        pute the (circular) convolution of the sequences given
        as its arguments.  If `r <- convolve(x,y)' and `n <-
        length(x)', then

                 r[k] = sum(i=1,..,n;  x[i] * y[k-i])

        for k = 1,...,n, where y[j] == y[n+j] for j < 0.

        The Fast Fourier Transform, `fft', is used for effi-
        ciency.

   RReeffeerreenncceess::

        Brillinger, D. R. (1981).  Time Series: Data Analysis
        and Theory, Second Edition.  San Francisco: Holden-Day.

   SSeeee AAllssoo::

        `fft', `nextn'.

   EExxaammpplleess::

        x <- c(0,0,0,100,0,0,0)
        y <- c(0,0,1, 2 ,1,0,0)/4
        round(convolve(x,y), 7)# this is *NOT* what you first thought..
        x <- rnorm(50);y <- rnorm(50)
        all(convolve(x,y), convolve(y,x))
        all(convolve(x,y, conj = FALSE), rev(convolve(y,x)))

