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 fn_unique
20 //! @{
21 
22 
23 template<typename T1>
24 arma_warn_unused
25 inline
26 typename
27 enable_if2
28   <
29   is_arma_type<T1>::value && resolves_to_vector<T1>::yes,
30   const Op<T1,op_unique_vec>
31   >::result
unique(const T1 & A)32 unique(const T1& A)
33   {
34   arma_extra_debug_sigprint();
35 
36   return Op<T1,op_unique_vec>(A);
37   }
38 
39 
40 template<typename T1>
41 arma_warn_unused
42 inline
43 typename
44 enable_if2
45   <
46   is_arma_type<T1>::value && resolves_to_vector<T1>::no,
47   const Op<T1,op_unique>
48   >::result
unique(const T1 & A)49 unique(const T1& A)
50   {
51   arma_extra_debug_sigprint();
52 
53   return Op<T1,op_unique>(A);
54   }
55 
56 
57 //! @}
58