

_F_a_s_t _C_o_n_v_o_l_u_t_i_o_n

     convolve(x, y, conj = TRUE)

_A_r_g_u_m_e_n_t_s:

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

_V_a_l_u_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_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     `fft', `nextn'.

_E_x_a_m_p_l_e_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)))

