1 // SPDX-License-Identifier: Apache-2.0
2 //
3 // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 // Copyright 2008-2016 National ICT Australia (NICTA)
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 // ------------------------------------------------------------------------
17 
18 
19 //! \addtogroup spop_misc
20 //! @{
21 
22 
23 class spop_scalar_times
24   : public traits_op_passthru
25   {
26   public:
27 
28   template<typename T1>
29   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_scalar_times>& in);
30   };
31 
32 
33 
34 class spop_cx_scalar_times
35   : public traits_op_passthru
36   {
37   public:
38 
39   template<typename T1>
40   inline static void apply(SpMat< std::complex<typename T1::pod_type> >& out, const mtSpOp< std::complex<typename T1::pod_type>, T1, spop_cx_scalar_times>& in);
41   };
42 
43 
44 
45 class spop_square
46   : public traits_op_passthru
47   {
48   public:
49 
50   template<typename T1>
51   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_square>& in);
52   };
53 
54 
55 
56 class spop_sqrt
57   : public traits_op_passthru
58   {
59   public:
60 
61   template<typename T1>
62   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_sqrt>& in);
63   };
64 
65 
66 
67 class spop_abs
68   : public traits_op_passthru
69   {
70   public:
71 
72   template<typename T1>
73   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_abs>& in);
74   };
75 
76 
77 
78 class spop_cx_abs
79   : public traits_op_passthru
80   {
81   public:
82 
83   template<typename T1>
84   inline static void apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1::pod_type, T1, spop_cx_abs>& in);
85   };
86 
87 
88 
89 class spop_arg
90   : public traits_op_passthru
91   {
92   public:
93 
94   template<typename T1>
95   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_arg>& in);
96   };
97 
98 
99 
100 class spop_cx_arg
101   : public traits_op_passthru
102   {
103   public:
104 
105   template<typename T1>
106   inline static void apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1::pod_type, T1, spop_cx_arg>& in);
107   };
108 
109 
110 
111 class spop_real
112   : public traits_op_passthru
113   {
114   public:
115 
116   template<typename T1>
117   inline static void apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1::pod_type, T1, spop_real>& in);
118   };
119 
120 
121 
122 class spop_imag
123   : public traits_op_passthru
124   {
125   public:
126 
127   template<typename T1>
128   inline static void apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1::pod_type, T1, spop_imag>& in);
129   };
130 
131 
132 
133 class spop_conj
134   : public traits_op_passthru
135   {
136   public:
137 
138   template<typename T1>
139   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_conj>& in);
140   };
141 
142 
143 
144 class spop_repelem
145   : public traits_op_default
146   {
147   public:
148 
149   template<typename T1>
150   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_repelem>& in);
151   };
152 
153 
154 
155 class spop_reshape
156   : public traits_op_default
157   {
158   public:
159 
160   template<typename T1>
161   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_reshape>& in);
162   };
163 
164 
165 
166 class spop_resize
167   : public traits_op_default
168   {
169   public:
170 
171   template<typename T1>
172   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_resize>& in);
173   };
174 
175 
176 
177 class spop_floor
178   : public traits_op_passthru
179   {
180   public:
181 
182   template<typename T1>
183   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_floor>& in);
184   };
185 
186 
187 
188 class spop_ceil
189   : public traits_op_passthru
190   {
191   public:
192 
193   template<typename T1>
194   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_ceil>& in);
195   };
196 
197 
198 
199 class spop_round
200   : public traits_op_passthru
201   {
202   public:
203 
204   template<typename T1>
205   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_round>& in);
206   };
207 
208 
209 
210 class spop_trunc
211   : public traits_op_passthru
212   {
213   public:
214 
215   template<typename T1>
216   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_trunc>& in);
217   };
218 
219 
220 
221 class spop_sign
222   : public traits_op_passthru
223   {
224   public:
225 
226   template<typename T1>
227   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_sign>& in);
228   };
229 
230 
231 
232 class spop_diagvec
233   : public traits_op_col
234   {
235   public:
236 
237   template<typename T1>
238   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_diagvec>& in);
239   };
240 
241 
242 
243 class spop_flipud
244   : public traits_op_passthru
245   {
246   public:
247 
248   template<typename T1>
249   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_flipud>& in);
250   };
251 
252 
253 
254 class spop_fliplr
255   : public traits_op_passthru
256   {
257   public:
258 
259   template<typename T1>
260   inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_fliplr>& in);
261   };
262 
263 
264 
265 //! @}
266