Row_proto.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2009 NICTA
00002 // 
00003 // Authors:
00004 // - Conrad Sanderson (conradsand at ieee dot org)
00005 // 
00006 // This file is part of the Armadillo C++ library.
00007 // It is provided without any warranty of fitness
00008 // for any purpose. You can redistribute this file
00009 // and/or modify it under the terms of the GNU
00010 // Lesser General Public License (LGPL) as published
00011 // by the Free Software Foundation, either version 3
00012 // of the License or (at your option) any later version.
00013 // (see http://www.opensource.org/licenses for more info)
00014 
00015 
00016 //! \addtogroup Row
00017 //! @{
00018 
00019 //! Class for row vectors (matrices with only one row)
00020 
00021 template<typename eT>
00022 class Row : public Mat<eT>, public Base_vec<eT, Row<eT> >
00023   {
00024   public:
00025   
00026   typedef eT elem_type;
00027   typedef typename get_pod_type<elem_type>::pod_type pod_type;
00028   
00029   
00030   inline                     Row();
00031   inline explicit            Row(const u32 N);
00032   
00033   inline                     Row(const char* text);
00034   inline const Row&    operator=(const char* text);  // TODO: std::string input
00035   
00036   inline                     Row(const Row& X);
00037   inline const Row&    operator=(const Row& X);
00038   inline const Row&   operator*=(const Row& X);
00039   
00040   //inline explicit            Row(const Mat<eT>& X);
00041   inline                     Row(const Mat<eT>& X);
00042   inline const Row&    operator=(const Mat<eT>& X);
00043   inline const Row&   operator*=(const Mat<eT>& X);
00044   
00045   inline                     Row(const eT* aux_mem, const u32 aux_length);
00046 
00047   template<typename T1, typename T2>
00048   inline explicit Row(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);
00049 
00050   inline                     Row(const subview<eT>& X);
00051   inline const Row&    operator=(const subview<eT>& X);
00052   inline const Row&   operator*=(const subview<eT>& X);
00053   
00054   inline explicit            Row(const diagview<eT>& X);
00055   inline const Row&    operator=(const diagview<eT>& X);
00056   inline const Row&   operator*=(const diagview<eT>& X);
00057   
00058   template<typename T1, typename op_type> inline                   Row(const Op<T1, op_type> &X);
00059   template<typename T1, typename op_type> inline const Row&  operator=(const Op<T1, op_type> &X);
00060   template<typename T1, typename op_type> inline const Row& operator*=(const Op<T1, op_type> &X);
00061   
00062   template<typename T1, typename T2, typename glue_type> inline                   Row(const Glue<T1, T2, glue_type> &X);
00063   template<typename T1, typename T2, typename glue_type> inline const Row&  operator=(const Glue<T1, T2, glue_type> &X);
00064   template<typename T1, typename T2, typename glue_type> inline const Row& operator*=(const Glue<T1, T2, glue_type> &X);
00065   
00066   
00067   inline void set_size(const u32 N);
00068   inline void set_size(const u32 n_rows, const u32 n_cols);
00069   
00070   inline void zeros();
00071   inline void zeros(const u32 N);
00072   inline void zeros(const u32 n_rows, const u32 n_cols);
00073 
00074 
00075   inline void load(const std::string name, const file_type type = auto_detect);
00076   };
00077 
00078 
00079 //! @}