op_median_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 2009-2010 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 
16 
17 
18 template<typename T>
20  {
21  T val;
23  };
24 
25 
26 
27 template<typename T>
28 inline
29 bool
30 operator< (const arma_cx_median_packet<T>& A, const arma_cx_median_packet<T>& B)
31  {
32  return A.val < B.val;
33  }
34 
35 
36 
38 class op_median
39  {
40  public:
41 
42  template<typename eT>
43  arma_inline static eT robust_mean(const eT A, const eT B);
44 
45  template<typename eT>
46  inline static eT direct_median(std::vector<eT>& X);
47 
48  template<typename eT>
49  inline static eT direct_median(const eT* X, const uword n_elem);
50 
51  template<typename eT>
52  inline static eT direct_median(const subview<eT>& X);
53 
54  template<typename eT>
55  inline static eT direct_median(const diagview<eT>& X);
56 
57  template<typename T1>
58  inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_median>& in);
59 
60 
61  //
62  // for complex numbers
63 
64  template<typename T>
65  arma_inline static std::complex<T> robust_mean(const std::complex<T>& A, const std::complex<T>& B);
66 
67  template<typename T>
68  inline static void direct_cx_median_index(uword& out_index1, uword& out_index2, std::vector< arma_cx_median_packet<T> >& X);
69 
70  template<typename T>
71  inline static void direct_cx_median_index(uword& out_index1, uword& out_index2, const std::complex<T>* X, const uword n_elem);
72 
73  template<typename T>
74  inline static void direct_cx_median_index(uword& out_index1, uword& out_index2, const subview< std::complex<T> >& X);
75 
76  template<typename T>
77  inline static void direct_cx_median_index(uword& out_index1, uword& out_index2, const diagview< std::complex<T> >& X);
78 
79  template<typename T, typename T1>
80  inline static void apply(Mat< std::complex<T> >& out, const Op<T1,op_median>& in);
81 
82 
83  };
84 
u32 uword
Definition: typedef.hpp:85
Dense matrix class.
#define arma_inline
Class for storing data required to extract and set the diagonals of a matrix.
Class for finding median values of a matrix.


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58