source: mmcs/armadillo_bits/fn_fft.hpp @ 8daa049

matrices
Last change on this file since 8daa049 was 9dd61b1, checked in by rboet <rboet@…>, 9 years ago

Avance del proyecto 60%

  • Property mode set to 100644
File size: 2.2 KB
Line 
1// Copyright (C) 2013 Conrad Sanderson
2// Copyright (C) 2013 NICTA (www.nicta.com.au)
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8
9//! \addtogroup fn_fft
10//! @{
11
12
13
14// 1D FFT & 1D IFFT
15
16
17
18template<typename T1>
19inline
20typename
21enable_if2
22  <
23  (is_arma_type<T1>::value && is_real<typename T1::elem_type>::value),
24  const mtOp<std::complex<typename T1::pod_type>, T1, op_fft_real>
25  >::result
26fft(const T1& A)
27  {
28  arma_extra_debug_sigprint();
29 
30  return mtOp<std::complex<typename T1::pod_type>, T1, op_fft_real>(A, uword(0), uword(1));
31  }
32
33
34
35template<typename T1>
36inline
37typename
38enable_if2
39  <
40  (is_arma_type<T1>::value && is_real<typename T1::elem_type>::value),
41  const mtOp<std::complex<typename T1::pod_type>, T1, op_fft_real>
42  >::result
43fft(const T1& A, const uword N)
44  {
45  arma_extra_debug_sigprint();
46 
47  return mtOp<std::complex<typename T1::pod_type>, T1, op_fft_real>(A, N, uword(0));
48  }
49
50
51
52template<typename T1>
53inline
54typename
55enable_if2
56  <
57  (is_arma_type<T1>::value && is_complex_strict<typename T1::elem_type>::value),
58  const Op<T1, op_fft_cx>
59  >::result
60fft(const T1& A)
61  {
62  arma_extra_debug_sigprint();
63 
64  return Op<T1, op_fft_cx>(A, uword(0), uword(1));
65  }
66
67
68
69template<typename T1>
70inline
71typename
72enable_if2
73  <
74  (is_arma_type<T1>::value && is_complex_strict<typename T1::elem_type>::value),
75  const Op<T1, op_fft_cx>
76  >::result
77fft(const T1& A, const uword N)
78  {
79  arma_extra_debug_sigprint();
80 
81  return Op<T1, op_fft_cx>(A, N, uword(0));
82  }
83
84
85
86template<typename T1>
87inline
88typename
89enable_if2
90  <
91  (is_arma_type<T1>::value && is_complex_strict<typename T1::elem_type>::value),
92  const Op<T1, op_ifft_cx>
93  >::result
94ifft(const T1& A)
95  {
96  arma_extra_debug_sigprint();
97 
98  return Op<T1, op_ifft_cx>(A, uword(0), uword(1));
99  }
100
101
102
103template<typename T1>
104inline
105typename
106enable_if2
107  <
108  (is_arma_type<T1>::value && is_complex_strict<typename T1::elem_type>::value),
109  const Op<T1, op_ifft_cx>
110  >::result
111ifft(const T1& A, const uword N)
112  {
113  arma_extra_debug_sigprint();
114 
115  return Op<T1, op_ifft_cx>(A, N, uword(0));
116  }
117
118
119
120//! @}
Note: See TracBrowser for help on using the repository browser.