Mercurial > hg > segmenter-vamp-plugin
comparison armadillo-3.900.4/include/armadillo_bits/subview_elem2_bones.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) 2012 NICTA (www.nicta.com.au) | |
2 // Copyright (C) 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 subview_elem2 | |
10 //! @{ | |
11 | |
12 | |
13 | |
14 template<typename eT, typename T1, typename T2> | |
15 class subview_elem2 : public Base<eT, subview_elem2<eT,T1,T2> > | |
16 { | |
17 public: | |
18 | |
19 typedef eT elem_type; | |
20 typedef typename get_pod_type<elem_type>::result pod_type; | |
21 | |
22 static const bool is_row = false; | |
23 static const bool is_col = false; | |
24 | |
25 arma_aligned const Mat<eT>& m; | |
26 | |
27 arma_aligned const Base<uword,T1>& base_ri; | |
28 arma_aligned const Base<uword,T2>& base_ci; | |
29 | |
30 const bool all_rows; | |
31 const bool all_cols; | |
32 | |
33 | |
34 protected: | |
35 | |
36 arma_inline subview_elem2(const Mat<eT>& in_m, const Base<uword,T1>& in_ri, const Base<uword,T2>& in_ci, const bool in_all_rows, const bool in_all_cols); | |
37 | |
38 | |
39 public: | |
40 | |
41 inline ~subview_elem2(); | |
42 | |
43 template<typename op_type> | |
44 inline void inplace_op(const eT val); | |
45 | |
46 template<typename op_type, typename expr> | |
47 inline void inplace_op(const Base<eT,expr>& x); | |
48 | |
49 inline void fill(const eT val); | |
50 inline void zeros(); | |
51 inline void ones(); | |
52 | |
53 inline void operator+= (const eT val); | |
54 inline void operator-= (const eT val); | |
55 inline void operator*= (const eT val); | |
56 inline void operator/= (const eT val); | |
57 | |
58 | |
59 // deliberately returning void | |
60 template<typename T3, typename T4> inline void operator_equ(const subview_elem2<eT,T3,T4>& x); | |
61 template<typename T3, typename T4> inline void operator= (const subview_elem2<eT,T3,T4>& x); | |
62 inline void operator= (const subview_elem2<eT,T1,T2>& x); | |
63 | |
64 template<typename T3, typename T4> inline void operator+= (const subview_elem2<eT,T3,T4>& x); | |
65 template<typename T3, typename T4> inline void operator-= (const subview_elem2<eT,T3,T4>& x); | |
66 template<typename T3, typename T4> inline void operator%= (const subview_elem2<eT,T3,T4>& x); | |
67 template<typename T3, typename T4> inline void operator/= (const subview_elem2<eT,T3,T4>& x); | |
68 | |
69 template<typename expr> inline void operator= (const Base<eT,expr>& x); | |
70 template<typename expr> inline void operator+= (const Base<eT,expr>& x); | |
71 template<typename expr> inline void operator-= (const Base<eT,expr>& x); | |
72 template<typename expr> inline void operator%= (const Base<eT,expr>& x); | |
73 template<typename expr> inline void operator/= (const Base<eT,expr>& x); | |
74 | |
75 inline static void extract(Mat<eT>& out, const subview_elem2& in); | |
76 | |
77 inline static void plus_inplace(Mat<eT>& out, const subview_elem2& in); | |
78 inline static void minus_inplace(Mat<eT>& out, const subview_elem2& in); | |
79 inline static void schur_inplace(Mat<eT>& out, const subview_elem2& in); | |
80 inline static void div_inplace(Mat<eT>& out, const subview_elem2& in); | |
81 | |
82 | |
83 | |
84 private: | |
85 | |
86 friend class Mat<eT>; | |
87 subview_elem2(); | |
88 }; | |
89 | |
90 | |
91 | |
92 //! @} |