Col_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 Col
00017 //! @{
00018 
00019 //! Class for column vectors (matrices with only column)
00020 
00021 template<typename eT>
00022 class Col : public Mat<eT>, public Base_vec<eT, Col<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                     Col();
00031   inline explicit            Col(const u32 n_elem);
00032   
00033   inline                     Col(const char* text);
00034   inline const Col&    operator=(const char* text);  // TODO: std::string input
00035   
00036   inline                     Col(const Col& X);
00037   inline const Col&    operator=(const Col& X);
00038   
00039   //inline explicit            Col(const Mat<eT>& X);
00040   inline                     Col(const Mat<eT>& X);
00041   inline const Col&    operator=(const Mat<eT>& X);
00042   inline const Col&   operator*=(const Mat<eT>& X);
00043   
00044   inline                     Col(const eT* aux_mem, const u32 aux_length);
00045   
00046   template<typename T1, typename T2>
00047   inline explicit Col(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);
00048 
00049   inline                     Col(const subview<eT>& X);
00050   inline const Col&    operator=(const subview<eT>& X);
00051   inline const Col&   operator*=(const subview<eT>& X);
00052   
00053   inline                     Col(const diagview<eT>& X);
00054   inline const Col&    operator=(const diagview<eT>& X);
00055   inline const Col&   operator*=(const diagview<eT>& X);
00056   
00057   template<typename T1, typename op_type> inline                   Col(const Op<T1, op_type>& X);
00058   template<typename T1, typename op_type> inline const Col&  operator=(const Op<T1, op_type>& X);
00059   template<typename T1, typename op_type> inline const Col& operator*=(const Op<T1, op_type>& X);
00060   
00061   template<typename T1, typename T2, typename glue_type> inline                   Col(const Glue<T1, T2, glue_type>& X);
00062   template<typename T1, typename T2, typename glue_type> inline const Col&  operator=(const Glue<T1, T2, glue_type>& X);
00063   template<typename T1, typename T2, typename glue_type> inline const Col& operator*=(const Glue<T1, T2, glue_type>& X);
00064     
00065   inline void set_size(const u32 n_elem);
00066   inline void set_size(const u32 n_rows, const u32 n_cols);
00067   
00068   inline void zeros();
00069   inline void zeros(const u32 n_elem);
00070   inline void zeros(const u32 n_rows, const u32 n_cols);
00071 
00072 
00073   inline void load(const std::string name, const file_type type = auto_detect);
00074   };
00075 
00076 
00077 //! @}