Mercurial > hg > segmenter-vamp-plugin
comparison armadillo-3.900.4/include/armadillo_bits/operator_cube_times.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) 2008-2010 NICTA (www.nicta.com.au) | |
2 // Copyright (C) 2008-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 | |
10 | |
11 //! \addtogroup operator_cube_times | |
12 //! @{ | |
13 | |
14 | |
15 | |
16 //! BaseCube * scalar | |
17 template<typename T1> | |
18 arma_inline | |
19 const eOpCube<T1, eop_scalar_times> | |
20 operator* | |
21 ( | |
22 const BaseCube<typename T1::elem_type,T1>& X, | |
23 const typename T1::elem_type k | |
24 ) | |
25 { | |
26 arma_extra_debug_sigprint(); | |
27 | |
28 return eOpCube<T1, eop_scalar_times>(X.get_ref(), k); | |
29 } | |
30 | |
31 | |
32 | |
33 //! scalar * BaseCube | |
34 template<typename T1> | |
35 arma_inline | |
36 const eOpCube<T1, eop_scalar_times> | |
37 operator* | |
38 ( | |
39 const typename T1::elem_type k, | |
40 const BaseCube<typename T1::elem_type,T1>& X | |
41 ) | |
42 { | |
43 arma_extra_debug_sigprint(); | |
44 | |
45 return eOpCube<T1, eop_scalar_times>(X.get_ref(), k); | |
46 } | |
47 | |
48 | |
49 | |
50 //! non-complex BaseCube * complex scalar (experimental) | |
51 template<typename T1> | |
52 arma_inline | |
53 const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times> | |
54 operator* | |
55 ( | |
56 const BaseCube<typename T1::pod_type, T1>& X, | |
57 const std::complex<typename T1::pod_type>& k | |
58 ) | |
59 { | |
60 arma_extra_debug_sigprint(); | |
61 | |
62 return mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times>('j', X.get_ref(), k); | |
63 } | |
64 | |
65 | |
66 | |
67 //! complex scalar * non-complex BaseCube (experimental) | |
68 template<typename T1> | |
69 arma_inline | |
70 const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times> | |
71 operator* | |
72 ( | |
73 const std::complex<typename T1::pod_type>& k, | |
74 const BaseCube<typename T1::pod_type, T1>& X | |
75 ) | |
76 { | |
77 arma_extra_debug_sigprint(); | |
78 | |
79 return mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times>('j', X.get_ref(), k); | |
80 } | |
81 | |
82 | |
83 | |
84 //! @} |