subview_elem1_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 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 
19 template<typename eT, typename T1>
20 class subview_elem1 : public Base<eT, subview_elem1<eT,T1> >
21  {
22  public: arma_aligned const Mat<eT>& m;
23  protected: arma_aligned Mat<eT>* m_ptr;
24 
25  public:
26 
27  typedef eT elem_type;
29 
31 
32 
33  protected:
34 
35  arma_inline subview_elem1(const Mat<eT>& in_m, const Base<uword,T1>& in_a);
36  arma_inline subview_elem1( Mat<eT>& in_m, const Base<uword,T1>& in_a);
37 
38 
39  public:
40 
41  inline ~subview_elem1();
42 
43  template<typename op_type> inline void inplace_op(const eT val);
44  template<typename op_type, typename T2> inline void inplace_op(const subview_elem1<eT,T2>& x );
45  template<typename op_type, typename T2> inline void inplace_op(const Base<eT,T2>& x );
46 
47  inline void fill(const eT val);
48  inline void zeros();
49  inline void ones();
50 
51  inline void operator+= (const eT val);
52  inline void operator-= (const eT val);
53  inline void operator*= (const eT val);
54  inline void operator/= (const eT val);
55 
56 
57  // deliberately returning void
58  template<typename T2> inline void operator_equ(const subview_elem1<eT,T2>& x);
59  template<typename T2> inline void operator= (const subview_elem1<eT,T2>& x);
60  inline void operator= (const subview_elem1<eT,T1>& x);
61  template<typename T2> inline void operator+= (const subview_elem1<eT,T2>& x);
62  template<typename T2> inline void operator-= (const subview_elem1<eT,T2>& x);
63  template<typename T2> inline void operator%= (const subview_elem1<eT,T2>& x);
64  template<typename T2> inline void operator/= (const subview_elem1<eT,T2>& x);
65 
66  template<typename T2> inline void operator= (const Base<eT,T2>& x);
67  template<typename T2> inline void operator+= (const Base<eT,T2>& x);
68  template<typename T2> inline void operator-= (const Base<eT,T2>& x);
69  template<typename T2> inline void operator%= (const Base<eT,T2>& x);
70  template<typename T2> inline void operator/= (const Base<eT,T2>& x);
71 
72  inline static void extract(Mat<eT>& out, const subview_elem1& in);
73 
74  template<typename op_type> inline static void mat_inplace_op(Mat<eT>& out, const subview_elem1& in);
75 
76  inline static void plus_inplace(Mat<eT>& out, const subview_elem1& in);
77  inline static void minus_inplace(Mat<eT>& out, const subview_elem1& in);
78  inline static void schur_inplace(Mat<eT>& out, const subview_elem1& in);
79  inline static void div_inplace(Mat<eT>& out, const subview_elem1& in);
80 
81 
82 
83  private:
84 
85  friend class Mat<eT>;
86  subview_elem1();
87  };
88 
89 
90 
91 class op_subview_elem_equ;
92 class op_subview_elem_inplace_plus;
93 class op_subview_elem_inplace_minus;
94 class op_subview_elem_inplace_schur;
95 class op_subview_elem_inplace_div;
96 
97 
98 
void operator_equ(const subview_elem1< eT, T2 > &x)
arma_aligned const Base< uword, T1 > & a
void operator*=(const eT val)
arma_aligned const Mat< eT > & m
void operator-=(const eT val)
void fill(const eT val)
static void minus_inplace(Mat< eT > &out, const subview_elem1 &in)
void operator+=(const eT val)
void inplace_op(const eT val)
static void schur_inplace(Mat< eT > &out, const subview_elem1 &in)
static void mat_inplace_op(Mat< eT > &out, const subview_elem1 &in)
#define arma_aligned
static void div_inplace(Mat< eT > &out, const subview_elem1 &in)
static void extract(Mat< eT > &out, const subview_elem1 &in)
Dense matrix class.
#define arma_inline
static void plus_inplace(Mat< eT > &out, const subview_elem1 &in)
void operator%=(const subview_elem1< eT, T2 > &x)
arma_aligned Mat< eT > * m_ptr
void operator=(const subview_elem1< eT, T2 > &x)
get_pod_type< elem_type >::result pod_type
void operator/=(const eT val)


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