subview_field_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2011 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 
20 template<typename oT>
21 class subview_field
22  {
23  public: const field<oT>& f;
24  protected: field<oT>* f_ptr;
25 
26  public:
27 
28  typedef oT object_type;
29 
30  const uword aux_row1;
31  const uword aux_col1;
32 
33  const uword n_rows;
34  const uword n_cols;
35  const uword n_elem;
36 
37 
38  protected:
39 
40  arma_inline subview_field(const field<oT>& in_f, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols);
41  arma_inline subview_field( field<oT>& in_f, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols);
42 
43 
44  public:
45 
46  inline ~subview_field();
47 
48  inline void operator= (const field<oT>& x);
49  inline void operator= (const subview_field& x);
50 
51  arma_inline oT& operator[](const uword i);
52  arma_inline const oT& operator[](const uword i) const;
53 
54  arma_inline oT& operator()(const uword i);
55  arma_inline const oT& operator()(const uword i) const;
56 
57  arma_inline oT& at(const uword row, const uword col);
58  arma_inline const oT& at(const uword row, const uword col) const;
59 
60  arma_inline oT& operator()(const uword row, const uword col);
61  arma_inline const oT& operator()(const uword row, const uword col) const;
62 
63  inline bool check_overlap(const subview_field& x) const;
64 
65  inline static void extract(field<oT>& out, const subview_field& in);
66 
67 
68  private:
69 
70  friend class field<oT>;
71 
72 
73  subview_field();
74  //subview_field(const subview_field&);
75  };
76 
77 
field< oT > * f_ptr
arma_inline oT & operator[](const uword i)
u32 uword
Definition: typedef.hpp:85
arma_inline oT & operator()(const uword i)
arma_inline oT & at(const uword row, const uword col)
bool check_overlap(const subview_field &x) const
const field< oT > & f
static void extract(field< oT > &out, const subview_field &in)
X = Y.subfield(...)
#define arma_inline
void operator=(const field< oT > &x)


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