comparison armadillo-2.4.4/include/armadillo_bits/fn_trig.hpp @ 0:8b6102e2a9b0

Armadillo Library
author maxzanoni76 <max.zanoni@eecs.qmul.ac.uk>
date Wed, 11 Apr 2012 09:27:06 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8b6102e2a9b0
1 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 2009-2010 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12
13
14 //! \addtogroup fn_trig
15 //! @{
16
17 //
18 // trigonometric functions:
19 // cos family: cos, acos, cosh, acosh
20 // sin family: sin, asin, sinh, asinh
21 // tan family: tan, atan, tanh, atanh
22
23
24 //
25 // cos
26
27 template<typename T1>
28 arma_inline
29 const eOp<T1, eop_cos>
30 cos(const Base<typename T1::elem_type,T1>& A)
31 {
32 arma_extra_debug_sigprint();
33
34 return eOp<T1, eop_cos>(A.get_ref());
35 }
36
37
38
39 template<typename T1>
40 arma_inline
41 const eOpCube<T1, eop_cos>
42 cos(const BaseCube<typename T1::elem_type,T1>& A)
43 {
44 arma_extra_debug_sigprint();
45
46 return eOpCube<T1, eop_cos>(A.get_ref());
47 }
48
49
50
51 //
52 // acos
53
54 template<typename T1>
55 arma_inline
56 const eOp<T1, eop_acos>
57 acos(const Base<typename T1::elem_type,T1>& A)
58 {
59 arma_extra_debug_sigprint();
60
61 return eOp<T1, eop_acos>(A.get_ref());
62 }
63
64
65
66 template<typename T1>
67 arma_inline
68 const eOpCube<T1, eop_acos>
69 acos(const BaseCube<typename T1::elem_type,T1>& A)
70 {
71 arma_extra_debug_sigprint();
72
73 return eOpCube<T1, eop_acos>(A.get_ref());
74 }
75
76
77
78 //
79 // cosh
80
81 template<typename T1>
82 arma_inline
83 const eOp<T1, eop_cosh>
84 cosh(const Base<typename T1::elem_type,T1>& A)
85 {
86 arma_extra_debug_sigprint();
87
88 return eOp<T1, eop_cosh>(A.get_ref());
89 }
90
91
92
93 template<typename T1>
94 arma_inline
95 const eOpCube<T1, eop_cosh>
96 cosh(const BaseCube<typename T1::elem_type,T1>& A)
97 {
98 arma_extra_debug_sigprint();
99
100 return eOpCube<T1, eop_cosh>(A.get_ref());
101 }
102
103
104
105 //
106 // acosh
107
108 template<typename T1>
109 arma_inline
110 const eOp<T1, eop_acosh>
111 acosh(const Base<typename T1::elem_type,T1>& A)
112 {
113 arma_extra_debug_sigprint();
114
115 return eOp<T1, eop_acosh>(A.get_ref());
116 }
117
118
119
120 template<typename T1>
121 arma_inline
122 const eOpCube<T1, eop_acosh>
123 acosh(const BaseCube<typename T1::elem_type,T1>& A)
124 {
125 arma_extra_debug_sigprint();
126
127 return eOpCube<T1, eop_acosh>(A.get_ref());
128 }
129
130
131
132 //
133 // sin
134
135 template<typename T1>
136 arma_inline
137 const eOp<T1, eop_sin>
138 sin(const Base<typename T1::elem_type,T1>& A)
139 {
140 arma_extra_debug_sigprint();
141
142 return eOp<T1, eop_sin>(A.get_ref());
143 }
144
145
146
147 template<typename T1>
148 arma_inline
149 const eOpCube<T1, eop_sin>
150 sin(const BaseCube<typename T1::elem_type,T1>& A)
151 {
152 arma_extra_debug_sigprint();
153
154 return eOpCube<T1, eop_sin>(A.get_ref());
155 }
156
157
158
159 //
160 // asin
161
162 template<typename T1>
163 arma_inline
164 const eOp<T1, eop_asin>
165 asin(const Base<typename T1::elem_type,T1>& A)
166 {
167 arma_extra_debug_sigprint();
168
169 return eOp<T1, eop_asin>(A.get_ref());
170 }
171
172
173
174 template<typename T1>
175 arma_inline
176 const eOpCube<T1, eop_asin>
177 asin(const BaseCube<typename T1::elem_type,T1>& A)
178 {
179 arma_extra_debug_sigprint();
180
181 return eOpCube<T1, eop_asin>(A.get_ref());
182 }
183
184
185
186 //
187 // sinh
188
189 template<typename T1>
190 arma_inline
191 const eOp<T1, eop_sinh>
192 sinh(const Base<typename T1::elem_type,T1>& A)
193 {
194 arma_extra_debug_sigprint();
195
196 return eOp<T1, eop_sinh>(A.get_ref());
197 }
198
199
200
201 template<typename T1>
202 arma_inline
203 const eOpCube<T1, eop_sinh>
204 sinh(const BaseCube<typename T1::elem_type,T1>& A)
205 {
206 arma_extra_debug_sigprint();
207
208 return eOpCube<T1, eop_sinh>(A.get_ref());
209 }
210
211
212
213 //
214 // asinh
215
216 template<typename T1>
217 arma_inline
218 const eOp<T1, eop_asinh>
219 asinh(const Base<typename T1::elem_type,T1>& A)
220 {
221 arma_extra_debug_sigprint();
222
223 return eOp<T1, eop_asinh>(A.get_ref());
224 }
225
226
227
228 template<typename T1>
229 arma_inline
230 const eOpCube<T1, eop_asinh>
231 asinh(const BaseCube<typename T1::elem_type,T1>& A)
232 {
233 arma_extra_debug_sigprint();
234
235 return eOpCube<T1, eop_asinh>(A.get_ref());
236 }
237
238
239
240 //
241 // tan
242
243 template<typename T1>
244 arma_inline
245 const eOp<T1, eop_tan>
246 tan(const Base<typename T1::elem_type,T1>& A)
247 {
248 arma_extra_debug_sigprint();
249
250 return eOp<T1, eop_tan>(A.get_ref());
251 }
252
253
254
255 template<typename T1>
256 arma_inline
257 const eOpCube<T1, eop_tan>
258 tan(const BaseCube<typename T1::elem_type,T1>& A)
259 {
260 arma_extra_debug_sigprint();
261
262 return eOpCube<T1, eop_tan>(A.get_ref());
263 }
264
265
266
267 //
268 // atan
269
270 template<typename T1>
271 arma_inline
272 const eOp<T1, eop_atan>
273 atan(const Base<typename T1::elem_type,T1>& A)
274 {
275 arma_extra_debug_sigprint();
276
277 return eOp<T1, eop_atan>(A.get_ref());
278 }
279
280
281
282 template<typename T1>
283 arma_inline
284 const eOpCube<T1, eop_atan>
285 atan(const BaseCube<typename T1::elem_type,T1>& A)
286 {
287 arma_extra_debug_sigprint();
288
289 return eOpCube<T1, eop_atan>(A.get_ref());
290 }
291
292
293
294 //
295 // tanh
296
297 template<typename T1>
298 arma_inline
299 const eOp<T1, eop_tanh>
300 tanh(const Base<typename T1::elem_type,T1>& A)
301 {
302 arma_extra_debug_sigprint();
303
304 return eOp<T1, eop_tanh>(A.get_ref());
305 }
306
307
308
309 template<typename T1>
310 arma_inline
311 const eOpCube<T1, eop_tanh>
312 tanh(const BaseCube<typename T1::elem_type,T1>& A)
313 {
314 arma_extra_debug_sigprint();
315
316 return eOpCube<T1, eop_tanh>(A.get_ref());
317 }
318
319
320
321 //
322 // atanh
323
324 template<typename T1>
325 arma_inline
326 const eOp<T1, eop_atanh>
327 atanh(const Base<typename T1::elem_type,T1>& A)
328 {
329 arma_extra_debug_sigprint();
330
331 return eOp<T1, eop_atanh>(A.get_ref());
332 }
333
334
335
336 template<typename T1>
337 arma_inline
338 const eOpCube<T1, eop_atanh>
339 atanh(const BaseCube<typename T1::elem_type,T1>& A)
340 {
341 arma_extra_debug_sigprint();
342
343 return eOpCube<T1, eop_atanh>(A.get_ref());
344 }
345
346
347
348 //! @}