max@0: // Copyright (C) 2010 NICTA (www.nicta.com.au) max@0: // Copyright (C) 2010 Conrad Sanderson max@0: // max@0: // This file is part of the Armadillo C++ library. max@0: // It is provided without any warranty of fitness max@0: // for any purpose. You can redistribute this file max@0: // and/or modify it under the terms of the GNU max@0: // Lesser General Public License (LGPL) as published max@0: // by the Free Software Foundation, either version 3 max@0: // of the License or (at your option) any later version. max@0: // (see http://www.opensource.org/licenses for more info) max@0: max@0: max@0: //! \addtogroup subview_elem1 max@0: //! @{ max@0: max@0: max@0: max@0: template max@0: class subview_elem1 : public Base > max@0: { max@0: public: arma_aligned const Mat& m; max@0: protected: arma_aligned Mat* m_ptr; max@0: max@0: public: max@0: max@0: typedef eT elem_type; max@0: typedef typename get_pod_type::result pod_type; max@0: max@0: arma_aligned const Base& a; max@0: max@0: max@0: protected: max@0: max@0: arma_inline subview_elem1(const Mat& in_m, const Base& in_a); max@0: arma_inline subview_elem1( Mat& in_m, const Base& in_a); max@0: max@0: max@0: public: max@0: max@0: inline ~subview_elem1(); max@0: max@0: template inline void inplace_op(const eT val); max@0: template inline void inplace_op(const subview_elem1& x ); max@0: template inline void inplace_op(const Base& x ); max@0: max@0: inline void fill(const eT val); max@0: inline void zeros(); max@0: inline void ones(); max@0: max@0: inline void operator+= (const eT val); max@0: inline void operator-= (const eT val); max@0: inline void operator*= (const eT val); max@0: inline void operator/= (const eT val); max@0: max@0: max@0: // deliberately returning void max@0: template inline void operator_equ(const subview_elem1& x); max@0: template inline void operator= (const subview_elem1& x); max@0: inline void operator= (const subview_elem1& x); max@0: template inline void operator+= (const subview_elem1& x); max@0: template inline void operator-= (const subview_elem1& x); max@0: template inline void operator%= (const subview_elem1& x); max@0: template inline void operator/= (const subview_elem1& x); max@0: max@0: template inline void operator= (const Base& x); max@0: template inline void operator+= (const Base& x); max@0: template inline void operator-= (const Base& x); max@0: template inline void operator%= (const Base& x); max@0: template inline void operator/= (const Base& x); max@0: max@0: inline static void extract(Mat& out, const subview_elem1& in); max@0: max@0: template inline static void mat_inplace_op(Mat& out, const subview_elem1& in); max@0: max@0: inline static void plus_inplace(Mat& out, const subview_elem1& in); max@0: inline static void minus_inplace(Mat& out, const subview_elem1& in); max@0: inline static void schur_inplace(Mat& out, const subview_elem1& in); max@0: inline static void div_inplace(Mat& out, const subview_elem1& in); max@0: max@0: max@0: max@0: private: max@0: max@0: friend class Mat; max@0: subview_elem1(); max@0: }; max@0: max@0: max@0: max@0: class op_subview_elem_equ; max@0: class op_subview_elem_inplace_plus; max@0: class op_subview_elem_inplace_minus; max@0: class op_subview_elem_inplace_schur; max@0: class op_subview_elem_inplace_div; max@0: max@0: max@0: max@0: //! @}