Mercurial > hg > segmenter-vamp-plugin
comparison armadillo-3.900.4/include/armadillo_bits/fn_trig.hpp @ 49:1ec0e2823891
Switch to using subrepo copies of qm-dsp, nnls-chroma, vamp-plugin-sdk; update Armadillo version; assume build without external BLAS/LAPACK
author | Chris Cannam |
---|---|
date | Thu, 13 Jun 2013 10:25:24 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
48:69251e11a913 | 49:1ec0e2823891 |
---|---|
1 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) | |
2 // Copyright (C) 2009-2010 Conrad Sanderson | |
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_trig | |
10 //! @{ | |
11 | |
12 // | |
13 // trigonometric functions: | |
14 // cos family: cos, acos, cosh, acosh | |
15 // sin family: sin, asin, sinh, asinh | |
16 // tan family: tan, atan, tanh, atanh | |
17 | |
18 | |
19 // | |
20 // cos | |
21 | |
22 template<typename T1> | |
23 arma_inline | |
24 const eOp<T1, eop_cos> | |
25 cos(const Base<typename T1::elem_type,T1>& A) | |
26 { | |
27 arma_extra_debug_sigprint(); | |
28 | |
29 return eOp<T1, eop_cos>(A.get_ref()); | |
30 } | |
31 | |
32 | |
33 | |
34 template<typename T1> | |
35 arma_inline | |
36 const eOpCube<T1, eop_cos> | |
37 cos(const BaseCube<typename T1::elem_type,T1>& A) | |
38 { | |
39 arma_extra_debug_sigprint(); | |
40 | |
41 return eOpCube<T1, eop_cos>(A.get_ref()); | |
42 } | |
43 | |
44 | |
45 | |
46 // | |
47 // acos | |
48 | |
49 template<typename T1> | |
50 arma_inline | |
51 const eOp<T1, eop_acos> | |
52 acos(const Base<typename T1::elem_type,T1>& A) | |
53 { | |
54 arma_extra_debug_sigprint(); | |
55 | |
56 return eOp<T1, eop_acos>(A.get_ref()); | |
57 } | |
58 | |
59 | |
60 | |
61 template<typename T1> | |
62 arma_inline | |
63 const eOpCube<T1, eop_acos> | |
64 acos(const BaseCube<typename T1::elem_type,T1>& A) | |
65 { | |
66 arma_extra_debug_sigprint(); | |
67 | |
68 return eOpCube<T1, eop_acos>(A.get_ref()); | |
69 } | |
70 | |
71 | |
72 | |
73 // | |
74 // cosh | |
75 | |
76 template<typename T1> | |
77 arma_inline | |
78 const eOp<T1, eop_cosh> | |
79 cosh(const Base<typename T1::elem_type,T1>& A) | |
80 { | |
81 arma_extra_debug_sigprint(); | |
82 | |
83 return eOp<T1, eop_cosh>(A.get_ref()); | |
84 } | |
85 | |
86 | |
87 | |
88 template<typename T1> | |
89 arma_inline | |
90 const eOpCube<T1, eop_cosh> | |
91 cosh(const BaseCube<typename T1::elem_type,T1>& A) | |
92 { | |
93 arma_extra_debug_sigprint(); | |
94 | |
95 return eOpCube<T1, eop_cosh>(A.get_ref()); | |
96 } | |
97 | |
98 | |
99 | |
100 // | |
101 // acosh | |
102 | |
103 template<typename T1> | |
104 arma_inline | |
105 const eOp<T1, eop_acosh> | |
106 acosh(const Base<typename T1::elem_type,T1>& A) | |
107 { | |
108 arma_extra_debug_sigprint(); | |
109 | |
110 return eOp<T1, eop_acosh>(A.get_ref()); | |
111 } | |
112 | |
113 | |
114 | |
115 template<typename T1> | |
116 arma_inline | |
117 const eOpCube<T1, eop_acosh> | |
118 acosh(const BaseCube<typename T1::elem_type,T1>& A) | |
119 { | |
120 arma_extra_debug_sigprint(); | |
121 | |
122 return eOpCube<T1, eop_acosh>(A.get_ref()); | |
123 } | |
124 | |
125 | |
126 | |
127 // | |
128 // sin | |
129 | |
130 template<typename T1> | |
131 arma_inline | |
132 const eOp<T1, eop_sin> | |
133 sin(const Base<typename T1::elem_type,T1>& A) | |
134 { | |
135 arma_extra_debug_sigprint(); | |
136 | |
137 return eOp<T1, eop_sin>(A.get_ref()); | |
138 } | |
139 | |
140 | |
141 | |
142 template<typename T1> | |
143 arma_inline | |
144 const eOpCube<T1, eop_sin> | |
145 sin(const BaseCube<typename T1::elem_type,T1>& A) | |
146 { | |
147 arma_extra_debug_sigprint(); | |
148 | |
149 return eOpCube<T1, eop_sin>(A.get_ref()); | |
150 } | |
151 | |
152 | |
153 | |
154 // | |
155 // asin | |
156 | |
157 template<typename T1> | |
158 arma_inline | |
159 const eOp<T1, eop_asin> | |
160 asin(const Base<typename T1::elem_type,T1>& A) | |
161 { | |
162 arma_extra_debug_sigprint(); | |
163 | |
164 return eOp<T1, eop_asin>(A.get_ref()); | |
165 } | |
166 | |
167 | |
168 | |
169 template<typename T1> | |
170 arma_inline | |
171 const eOpCube<T1, eop_asin> | |
172 asin(const BaseCube<typename T1::elem_type,T1>& A) | |
173 { | |
174 arma_extra_debug_sigprint(); | |
175 | |
176 return eOpCube<T1, eop_asin>(A.get_ref()); | |
177 } | |
178 | |
179 | |
180 | |
181 // | |
182 // sinh | |
183 | |
184 template<typename T1> | |
185 arma_inline | |
186 const eOp<T1, eop_sinh> | |
187 sinh(const Base<typename T1::elem_type,T1>& A) | |
188 { | |
189 arma_extra_debug_sigprint(); | |
190 | |
191 return eOp<T1, eop_sinh>(A.get_ref()); | |
192 } | |
193 | |
194 | |
195 | |
196 template<typename T1> | |
197 arma_inline | |
198 const eOpCube<T1, eop_sinh> | |
199 sinh(const BaseCube<typename T1::elem_type,T1>& A) | |
200 { | |
201 arma_extra_debug_sigprint(); | |
202 | |
203 return eOpCube<T1, eop_sinh>(A.get_ref()); | |
204 } | |
205 | |
206 | |
207 | |
208 // | |
209 // asinh | |
210 | |
211 template<typename T1> | |
212 arma_inline | |
213 const eOp<T1, eop_asinh> | |
214 asinh(const Base<typename T1::elem_type,T1>& A) | |
215 { | |
216 arma_extra_debug_sigprint(); | |
217 | |
218 return eOp<T1, eop_asinh>(A.get_ref()); | |
219 } | |
220 | |
221 | |
222 | |
223 template<typename T1> | |
224 arma_inline | |
225 const eOpCube<T1, eop_asinh> | |
226 asinh(const BaseCube<typename T1::elem_type,T1>& A) | |
227 { | |
228 arma_extra_debug_sigprint(); | |
229 | |
230 return eOpCube<T1, eop_asinh>(A.get_ref()); | |
231 } | |
232 | |
233 | |
234 | |
235 // | |
236 // tan | |
237 | |
238 template<typename T1> | |
239 arma_inline | |
240 const eOp<T1, eop_tan> | |
241 tan(const Base<typename T1::elem_type,T1>& A) | |
242 { | |
243 arma_extra_debug_sigprint(); | |
244 | |
245 return eOp<T1, eop_tan>(A.get_ref()); | |
246 } | |
247 | |
248 | |
249 | |
250 template<typename T1> | |
251 arma_inline | |
252 const eOpCube<T1, eop_tan> | |
253 tan(const BaseCube<typename T1::elem_type,T1>& A) | |
254 { | |
255 arma_extra_debug_sigprint(); | |
256 | |
257 return eOpCube<T1, eop_tan>(A.get_ref()); | |
258 } | |
259 | |
260 | |
261 | |
262 // | |
263 // atan | |
264 | |
265 template<typename T1> | |
266 arma_inline | |
267 const eOp<T1, eop_atan> | |
268 atan(const Base<typename T1::elem_type,T1>& A) | |
269 { | |
270 arma_extra_debug_sigprint(); | |
271 | |
272 return eOp<T1, eop_atan>(A.get_ref()); | |
273 } | |
274 | |
275 | |
276 | |
277 template<typename T1> | |
278 arma_inline | |
279 const eOpCube<T1, eop_atan> | |
280 atan(const BaseCube<typename T1::elem_type,T1>& A) | |
281 { | |
282 arma_extra_debug_sigprint(); | |
283 | |
284 return eOpCube<T1, eop_atan>(A.get_ref()); | |
285 } | |
286 | |
287 | |
288 | |
289 // | |
290 // tanh | |
291 | |
292 template<typename T1> | |
293 arma_inline | |
294 const eOp<T1, eop_tanh> | |
295 tanh(const Base<typename T1::elem_type,T1>& A) | |
296 { | |
297 arma_extra_debug_sigprint(); | |
298 | |
299 return eOp<T1, eop_tanh>(A.get_ref()); | |
300 } | |
301 | |
302 | |
303 | |
304 template<typename T1> | |
305 arma_inline | |
306 const eOpCube<T1, eop_tanh> | |
307 tanh(const BaseCube<typename T1::elem_type,T1>& A) | |
308 { | |
309 arma_extra_debug_sigprint(); | |
310 | |
311 return eOpCube<T1, eop_tanh>(A.get_ref()); | |
312 } | |
313 | |
314 | |
315 | |
316 // | |
317 // atanh | |
318 | |
319 template<typename T1> | |
320 arma_inline | |
321 const eOp<T1, eop_atanh> | |
322 atanh(const Base<typename T1::elem_type,T1>& A) | |
323 { | |
324 arma_extra_debug_sigprint(); | |
325 | |
326 return eOp<T1, eop_atanh>(A.get_ref()); | |
327 } | |
328 | |
329 | |
330 | |
331 template<typename T1> | |
332 arma_inline | |
333 const eOpCube<T1, eop_atanh> | |
334 atanh(const BaseCube<typename T1::elem_type,T1>& A) | |
335 { | |
336 arma_extra_debug_sigprint(); | |
337 | |
338 return eOpCube<T1, eop_atanh>(A.get_ref()); | |
339 } | |
340 | |
341 | |
342 | |
343 //! @} |