Mercurial > hg > segmenter-vamp-plugin
comparison armadillo-2.4.4/include/armadillo_bits/arrayops_bones.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) 2011 NICTA (www.nicta.com.au) | |
2 // Copyright (C) 2011 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 arrayops | |
15 //! @{ | |
16 | |
17 | |
18 class arrayops | |
19 { | |
20 public: | |
21 | |
22 template<typename eT> | |
23 arma_hot arma_inline static void | |
24 copy(eT* dest, const eT* src, const uword n_elem); | |
25 | |
26 | |
27 template<typename eT> | |
28 static inline void | |
29 copy_big(eT* dest, const eT* src, const uword n_elem); | |
30 | |
31 | |
32 // | |
33 // array = convert(array) | |
34 | |
35 template<typename out_eT, typename in_eT> | |
36 arma_hot arma_inline static void | |
37 convert_cx_scalar(out_eT& out, const in_eT& in, const typename arma_not_cx<out_eT>::result* junk1 = 0, const typename arma_not_cx< in_eT>::result* junk2 = 0); | |
38 | |
39 template<typename out_eT, typename in_T> | |
40 arma_hot arma_inline static void | |
41 convert_cx_scalar(out_eT& out, const std::complex<in_T>& in, const typename arma_not_cx<out_eT>::result* junk = 0); | |
42 | |
43 template<typename out_T, typename in_T> | |
44 arma_hot arma_inline static void | |
45 convert_cx_scalar(std::complex<out_T>& out, const std::complex< in_T>& in); | |
46 | |
47 template<typename out_eT, typename in_eT> | |
48 arma_hot inline static void | |
49 convert(out_eT* dest, const in_eT* src, const uword n_elem); | |
50 | |
51 template<typename out_eT, typename in_eT> | |
52 arma_hot inline static void | |
53 convert_cx(out_eT* dest, const in_eT* src, const uword n_elem); | |
54 | |
55 | |
56 // | |
57 // array op= array | |
58 | |
59 template<typename eT> | |
60 arma_hot inline static | |
61 void | |
62 inplace_plus(eT* dest, const eT* src, const uword n_elem); | |
63 | |
64 template<typename eT> | |
65 arma_hot inline static | |
66 void | |
67 inplace_minus(eT* dest, const eT* src, const uword n_elem); | |
68 | |
69 template<typename eT> | |
70 arma_hot inline static | |
71 void | |
72 inplace_mul(eT* dest, const eT* src, const uword n_elem); | |
73 | |
74 template<typename eT> | |
75 arma_hot inline static | |
76 void | |
77 inplace_div(eT* dest, const eT* src, const uword n_elem); | |
78 | |
79 | |
80 // | |
81 // array op= scalar | |
82 | |
83 template<typename eT> | |
84 arma_hot inline static | |
85 void | |
86 inplace_set(eT* dest, const eT val, const uword n_elem); | |
87 | |
88 template<typename eT> | |
89 arma_hot inline static | |
90 void | |
91 inplace_plus(eT* dest, const eT val, const uword n_elem); | |
92 | |
93 template<typename eT> | |
94 arma_hot inline static | |
95 void | |
96 inplace_minus(eT* dest, const eT val, const uword n_elem); | |
97 | |
98 template<typename eT> | |
99 arma_hot inline static void | |
100 inplace_mul(eT* dest, const eT val, const uword n_elem); | |
101 | |
102 template<typename eT> | |
103 arma_hot inline static | |
104 void | |
105 inplace_div(eT* dest, const eT val, const uword n_elem); | |
106 | |
107 | |
108 // | |
109 // scalar = op(array) | |
110 | |
111 template<typename eT> | |
112 arma_hot arma_pure inline static | |
113 eT | |
114 accumulate(const eT* src, const uword n_elem); | |
115 | |
116 template<typename eT> | |
117 arma_hot arma_pure inline static | |
118 eT | |
119 product(const eT* src, const uword n_elem); | |
120 | |
121 template<typename eT> | |
122 arma_hot arma_pure inline static | |
123 bool | |
124 is_finite(const eT* src, const uword n_elem); | |
125 | |
126 template<typename eT> | |
127 arma_hot arma_pure inline static | |
128 typename get_pod_type<eT>::result | |
129 norm_1(const eT* src, const uword n_elem); | |
130 | |
131 template<typename eT> | |
132 arma_hot arma_pure inline static | |
133 eT | |
134 norm_2(const eT* src, const uword n_elem, const typename arma_not_cx<eT>::result* junk = 0); | |
135 | |
136 template<typename T> | |
137 arma_hot arma_pure inline static | |
138 T | |
139 norm_2(const std::complex<T>* src, const uword n_elem); | |
140 | |
141 template<typename eT> | |
142 arma_hot arma_pure inline static | |
143 typename get_pod_type<eT>::result | |
144 norm_k(const eT* src, const uword n_elem, const int k); | |
145 | |
146 template<typename eT> | |
147 arma_hot arma_pure inline static | |
148 typename get_pod_type<eT>::result | |
149 norm_max(const eT* src, const uword n_elem); | |
150 | |
151 template<typename eT> | |
152 arma_hot arma_pure inline static | |
153 typename get_pod_type<eT>::result | |
154 norm_min(const eT* src, const uword n_elem); | |
155 | |
156 }; | |
157 | |
158 | |
159 | |
160 //! @} |