00001 // Copyright (C) 2010 NICTA and the authors listed below 00002 // http://nicta.com.au 00003 // 00004 // Authors: 00005 // - Conrad Sanderson (conradsand at ieee dot org) 00006 // 00007 // This file is part of the Armadillo C++ library. 00008 // It is provided without any warranty of fitness 00009 // for any purpose. You can redistribute this file 00010 // and/or modify it under the terms of the GNU 00011 // Lesser General Public License (LGPL) as published 00012 // by the Free Software Foundation, either version 3 00013 // of the License or (at your option) any later version. 00014 // (see http://www.opensource.org/licenses for more info) 00015 00016 00017 //! \addtogroup strip 00018 //! @{ 00019 00020 00021 00022 template<typename T1> 00023 struct strip_diagmat 00024 { 00025 typedef T1 stored_type; 00026 00027 inline strip_diagmat(const Base<typename T1::elem_type, T1>& X) 00028 : do_diagmat(false) 00029 , M (X.get_ref()) 00030 { 00031 arma_extra_debug_sigprint(); 00032 } 00033 00034 const bool do_diagmat; 00035 const T1& M; 00036 }; 00037 00038 00039 00040 template<typename T1> 00041 struct strip_diagmat< Op<T1, op_diagmat> > 00042 { 00043 typedef T1 stored_type; 00044 00045 inline strip_diagmat(const Op<T1, op_diagmat>& X) 00046 : do_diagmat(true) 00047 , M (X.m) 00048 { 00049 arma_extra_debug_sigprint(); 00050 } 00051 00052 const bool do_diagmat; 00053 const T1& M; 00054 }; 00055 00056 00057 00058 template<typename T1> 00059 struct strip_inv 00060 { 00061 typedef T1 stored_type; 00062 00063 inline strip_inv(const T1& X) 00064 : do_inv(false) 00065 , M (X) 00066 { 00067 arma_extra_debug_sigprint(); 00068 } 00069 00070 const bool do_inv; 00071 const T1& M; 00072 }; 00073 00074 00075 00076 template<typename T1> 00077 struct strip_inv< Op<T1, op_inv> > 00078 { 00079 typedef T1 stored_type; 00080 00081 inline strip_inv(const Op<T1, op_inv>& X) 00082 : do_inv(true) 00083 , M (X.m) 00084 { 00085 arma_extra_debug_sigprint(); 00086 } 00087 00088 const bool do_inv; 00089 const T1& M; 00090 }; 00091 00092 00093 00094 //! @}