fn_htrans.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 fn_htrans
00017 //! @{
00018 
00019 
00020 template<typename T>
00021 inline
00022 const Op<Mat< std::complex<T> >, op_htrans>
00023 htrans(const Mat< std::complex<T> >& X)
00024   {
00025   arma_extra_debug_sigprint();
00026   
00027   return Op<Mat< std::complex<T> >, op_htrans>(X);
00028   }
00029 
00030 
00031 
00032 template<typename T>
00033 inline
00034 const Op<Row< std::complex<T> >, op_htrans>
00035 htrans(const Row< std::complex<T> >& X)
00036   {
00037   arma_extra_debug_sigprint();
00038   
00039   return Op<Row< std::complex<T> >, op_htrans>(X);
00040   }
00041 
00042 
00043 
00044 template<typename T>
00045 inline
00046 const Op<Col< std::complex<T> >, op_htrans>
00047 htrans(const Col< std::complex<T> >& X)
00048   {
00049   arma_extra_debug_sigprint();
00050   
00051   return Op<Col< std::complex<T> >, op_htrans>(X);
00052   }
00053 
00054 
00055 
00056 template<typename T, typename T1>
00057 inline
00058 const Op<T1, op_htrans>
00059 htrans(const Base<std::complex<T>,T1>& X)
00060   {
00061   arma_extra_debug_sigprint();
00062   
00063   return Op<T1, op_htrans>(X.get_ref());
00064   }
00065 
00066 
00067 
00068 //! two consecutive hermitian transpose operations cancel each other
00069 template<typename T1>
00070 inline
00071 const T1&
00072 htrans(const Op<T1, op_htrans>& X)
00073   {
00074   arma_extra_debug_sigprint();
00075   arma_extra_debug_print("htrans(): removing op_htrans");
00076   
00077   return X.m;
00078   }
00079 
00080 
00081 //! @}