Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 template<typename oT>
00024 class subview_field
00025 {
00026 public: const field<oT>& f;
00027 protected: field<oT>* f_ptr;
00028
00029 public:
00030
00031 typedef oT object_type;
00032
00033 const u32 aux_row1;
00034 const u32 aux_col1;
00035
00036 const u32 aux_row2;
00037 const u32 aux_col2;
00038
00039 const u32 n_rows;
00040 const u32 n_cols;
00041 const u32 n_elem;
00042
00043
00044 protected:
00045
00046 arma_inline subview_field(const field<oT>& in_f, const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2);
00047 arma_inline subview_field( field<oT>& in_f, const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2);
00048
00049
00050 public:
00051
00052 inline ~subview_field();
00053
00054 inline void operator= (const field<oT>& x);
00055 inline void operator= (const subview_field& x);
00056
00057 arma_inline oT& operator[](const u32 i);
00058 arma_inline const oT& operator[](const u32 i) const;
00059
00060 arma_inline oT& operator()(const u32 i);
00061 arma_inline const oT& operator()(const u32 i) const;
00062
00063 arma_inline oT& at(const u32 row, const u32 col);
00064 arma_inline const oT& at(const u32 row, const u32 col) const;
00065
00066 arma_inline oT& operator()(const u32 row, const u32 col);
00067 arma_inline const oT& operator()(const u32 row, const u32 col) const;
00068
00069 inline bool check_overlap(const subview_field& x) const;
00070
00071 inline static void extract(field<oT>& out, const subview_field& in);
00072
00073
00074 private:
00075
00076 friend class field<oT>;
00077
00078
00079 subview_field();
00080
00081 };
00082
00083
00084