comparison armadillo-3.900.4/include/armadillo_bits/fn_sort.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-2012 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 //! \addtogroup fn_sort
10 //! @{
11
12
13 template<typename T1>
14 arma_inline
15 typename
16 enable_if2
17 <
18 ( (is_arma_type<T1>::value == true) && (resolves_to_vector<T1>::value == false) ),
19 const Op<T1, op_sort>
20 >::result
21 sort
22 (
23 const T1& X,
24 const uword sort_type = 0,
25 const uword dim = 0
26 )
27 {
28 arma_extra_debug_sigprint();
29
30 return Op<T1, op_sort>(X, sort_type, dim);
31 }
32
33
34
35 template<typename T1>
36 arma_inline
37 typename
38 enable_if2
39 <
40 ( (is_arma_type<T1>::value == true) && (resolves_to_vector<T1>::value == true) ),
41 const Op<T1, op_sort>
42 >::result
43 sort
44 (
45 const T1& X,
46 const uword sort_type = 0
47 )
48 {
49 arma_extra_debug_sigprint();
50
51 const uword dim = (T1::is_col) ? 0 : 1;
52
53 return Op<T1, op_sort>(X, sort_type, dim);
54 }
55
56
57
58 //! @}