fn_trans.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 template<typename T1>
00021 inline
00022 const Op<T1, op_trans>
00023 trans(const Base<typename T1::elem_type,T1>& X)
00024 {
00025 arma_extra_debug_sigprint();
00026
00027 return Op<T1, op_trans>(X.get_ref());
00028 }
00029
00030
00031
00032 template<typename eT>
00033 inline
00034 const Op<Row<eT>, op_trans>
00035 trans(const Row<eT>& X)
00036 {
00037 arma_extra_debug_sigprint();
00038
00039 return Op<Row<eT>, op_trans>(X);
00040 }
00041
00042
00043
00044 template<typename eT>
00045 inline
00046 const Op<Col<eT>, op_trans>
00047 trans(const Col<eT>& X)
00048 {
00049 arma_extra_debug_sigprint();
00050
00051 return Op<Col<eT>, op_trans>(X);
00052 }
00053
00054
00055
00056
00057 template<typename T1>
00058 inline
00059 const T1&
00060 trans(const Op<T1, op_trans>& X)
00061 {
00062 arma_extra_debug_sigprint();
00063 arma_extra_debug_print("trans(): removing op_trans");
00064
00065 return X.m;
00066 }
00067
00068
00069
00070
00071 template<typename T1>
00072 inline
00073 const Op<T1, op_diagmat>
00074 trans(const Op<T1, op_diagmat>& X)
00075 {
00076 arma_extra_debug_sigprint();
00077 arma_extra_debug_print("trans(): not applying op_trans to diagonal matrix");
00078
00079 return X;
00080 }
00081
00082
00083
00084
00085 template<typename T1>
00086 inline
00087 const Op<T1, op_htrans>
00088 trans(const Op<T1, op_conj>& X)
00089 {
00090 arma_extra_debug_sigprint();
00091
00092 arma_type_check< is_complex<typename T1::elem_type>::value == false >::apply();
00093
00094 return Op<T1, op_htrans>(X.m);
00095 }
00096
00097
00098
00099