A neural net approach to discrete Hartley and Fourier transforms