subview_field_bones.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
00002 // Copyright (C) 2008-2011 Conrad Sanderson
00003 // 
00004 // This file is part of the Armadillo C++ library.
00005 // It is provided without any warranty of fitness
00006 // for any purpose. You can redistribute this file
00007 // and/or modify it under the terms of the GNU
00008 // Lesser General Public License (LGPL) as published
00009 // by the Free Software Foundation, either version 3
00010 // of the License or (at your option) any later version.
00011 // (see http://www.opensource.org/licenses for more info)
00012 
00013 
00016 
00017 
00020 template<typename oT>
00021 class subview_field
00022   {
00023   public:  const field<oT>& f;
00024   protected:     field<oT>* f_ptr;
00025   
00026   public:
00027   
00028   typedef oT object_type;
00029   
00030   const uword aux_row1;
00031   const uword aux_col1;
00032   
00033   const uword n_rows;
00034   const uword n_cols;
00035   const uword n_elem;
00036   
00037   
00038   protected:
00039   
00040   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);
00041   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);
00042   
00043   
00044   public:
00045   
00046   inline ~subview_field();
00047   
00048   inline void operator= (const field<oT>& x);
00049   inline void operator= (const subview_field& x);
00050   
00051   arma_inline       oT& operator[](const uword i);
00052   arma_inline const oT& operator[](const uword i) const;
00053   
00054   arma_inline       oT& operator()(const uword i);
00055   arma_inline const oT& operator()(const uword i) const;
00056   
00057   arma_inline       oT&         at(const uword row, const uword col);
00058   arma_inline const oT&         at(const uword row, const uword col) const;
00059   
00060   arma_inline       oT& operator()(const uword row, const uword col);
00061   arma_inline const oT& operator()(const uword row, const uword col) const;
00062   
00063   inline bool check_overlap(const subview_field& x) const;
00064   
00065   inline static void extract(field<oT>& out, const subview_field& in);
00066   
00067   
00068   private:
00069   
00070   friend class field<oT>;
00071   
00072   
00073   subview_field();
00074   //subview_field(const subview_field&);
00075   };
00076 
00077 


armadillo_matrix
Author(s): Conrad Sanderson - NICTA (www.nicta.com.au), (Wrapper by Sjoerd van den Dries)
autogenerated on Tue Jan 7 2014 11:42:06