diff options
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Fourier.hs')
-rw-r--r-- | packages/hmatrix/src/Numeric/GSL/Fourier.hs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/packages/hmatrix/src/Numeric/GSL/Fourier.hs b/packages/hmatrix/src/Numeric/GSL/Fourier.hs index 86aedd6..734325b 100644 --- a/packages/hmatrix/src/Numeric/GSL/Fourier.hs +++ b/packages/hmatrix/src/Numeric/GSL/Fourier.hs | |||
@@ -1,26 +1,23 @@ | |||
1 | {-# LANGUAGE ForeignFunctionInterface #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | 1 | {- | |
4 | Module : Numeric.GSL.Fourier | 2 | Module : Numeric.GSL.Fourier |
5 | Copyright : (c) Alberto Ruiz 2006 | 3 | Copyright : (c) Alberto Ruiz 2006 |
6 | License : GPL-style | 4 | License : GPL |
7 | 5 | Maintainer : Alberto Ruiz | |
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | 6 | Stability : provisional |
10 | Portability : uses ffi | ||
11 | 7 | ||
12 | Fourier Transform. | 8 | Fourier Transform. |
13 | 9 | ||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Fast-Fourier-Transforms.html#Fast-Fourier-Transforms> | 10 | <http://www.gnu.org/software/gsl/manual/html_node/Fast-Fourier-Transforms.html#Fast-Fourier-Transforms> |
15 | 11 | ||
16 | -} | 12 | -} |
17 | ----------------------------------------------------------------------------- | 13 | |
18 | module Numeric.GSL.Fourier ( | 14 | module Numeric.GSL.Fourier ( |
19 | fft, | 15 | fft, |
20 | ifft | 16 | ifft |
21 | ) where | 17 | ) where |
22 | 18 | ||
23 | import Data.Packed.Internal | 19 | import Data.Packed |
20 | import Numeric.GSL.Internal | ||
24 | import Data.Complex | 21 | import Data.Complex |
25 | import Foreign.C.Types | 22 | import Foreign.C.Types |
26 | import System.IO.Unsafe (unsafePerformIO) | 23 | import System.IO.Unsafe (unsafePerformIO) |
@@ -30,7 +27,7 @@ genfft code v = unsafePerformIO $ do | |||
30 | app2 (c_fft code) vec v vec r "fft" | 27 | app2 (c_fft code) vec v vec r "fft" |
31 | return r | 28 | return r |
32 | 29 | ||
33 | foreign import ccall unsafe "gsl-aux.h fft" c_fft :: CInt -> TCVCV | 30 | foreign import ccall unsafe "gsl-aux.h fft" c_fft :: CInt -> TCV (TCV Res) |
34 | 31 | ||
35 | 32 | ||
36 | {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. | 33 | {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. |