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 
20 //! \addtogroup op_find
21 //! @{
22 
23 
24 
25 class op_find
26   : public traits_op_col
27   {
28   public:
29 
30   template<typename T1>
31   inline static uword
32   helper
33     (
34     Mat<uword>& indices,
35     const Base<typename T1::elem_type, T1>& X
36     );
37 
38   template<typename T1, typename op_type>
39   inline static uword
40   helper
41     (
42     Mat<uword>& indices,
43     const mtOp<uword, T1, op_type>& X,
44     const typename arma_op_rel_only<op_type>::result* junk1 = nullptr,
45     const typename arma_not_cx<typename T1::elem_type>::result* junk2 = nullptr
46     );
47 
48   template<typename T1, typename op_type>
49   inline static uword
50   helper
51     (
52     Mat<uword>& indices,
53     const mtOp<uword, T1, op_type>& X,
54     const typename arma_op_rel_only<op_type>::result* junk1 = nullptr,
55     const typename arma_cx_only<typename T1::elem_type>::result* junk2 = nullptr
56     );
57 
58   template<typename T1, typename T2, typename glue_type>
59   inline static uword
60   helper
61     (
62     Mat<uword>& indices,
63     const mtGlue<uword, T1, T2, glue_type>& X,
64     const typename arma_glue_rel_only<glue_type>::result* junk1 = nullptr,
65     const typename arma_not_cx<typename T1::elem_type>::result* junk2 = nullptr,
66     const typename arma_not_cx<typename T2::elem_type>::result* junk3 = nullptr
67     );
68 
69   template<typename T1, typename T2, typename glue_type>
70   inline static uword
71   helper
72     (
73     Mat<uword>& indices,
74     const mtGlue<uword, T1, T2, glue_type>& X,
75     const typename arma_glue_rel_only<glue_type>::result* junk1 = nullptr,
76     const typename arma_cx_only<typename T1::elem_type>::result* junk2 = nullptr,
77     const typename arma_cx_only<typename T2::elem_type>::result* junk3 = nullptr
78     );
79 
80   template<typename T1>
81   inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find>& X);
82   };
83 
84 
85 
86 class op_find_simple
87   : public traits_op_col
88   {
89   public:
90 
91   template<typename T1>
92   inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_simple>& X);
93   };
94 
95 
96 
97 class op_find_finite
98   : public traits_op_col
99   {
100   public:
101 
102   template<typename T1>
103   inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_finite>& X);
104   };
105 
106 
107 
108 class op_find_nonfinite
109   : public traits_op_col
110   {
111   public:
112 
113   template<typename T1>
114   inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_nonfinite>& X);
115   };
116 
117 
118 
119 //! @}
120