1 // SPDX-License-Identifier: Apache-2.0 2 // 3 // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) 4 // Copyright 2008-2016 National ICT Australia (NICTA) 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, software 12 // distributed under the License is distributed on an "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // See the License for the specific language governing permissions and 15 // limitations under the License. 16 // ------------------------------------------------------------------------ 17 18 19 //! \addtogroup strip 20 //! @{ 21 22 23 24 template<typename T1> 25 struct strip_diagmat 26 { 27 typedef T1 stored_type; 28 29 inline strip_diagmatstrip_diagmat30 strip_diagmat(const T1& X) 31 : M(X) 32 { 33 arma_extra_debug_sigprint(); 34 } 35 36 static constexpr bool do_diagmat = false; 37 38 const T1& M; 39 }; 40 41 42 43 template<typename T1> 44 struct strip_diagmat< Op<T1, op_diagmat> > 45 { 46 typedef T1 stored_type; 47 48 inline strip_diagmatstrip_diagmat49 strip_diagmat(const Op<T1, op_diagmat>& X) 50 : M(X.m) 51 { 52 arma_extra_debug_sigprint(); 53 } 54 55 static constexpr bool do_diagmat = true; 56 57 const T1& M; 58 }; 59 60 61 62 template<typename T1> 63 struct strip_inv 64 { 65 typedef T1 stored_type; 66 67 inline strip_invstrip_inv68 strip_inv(const T1& X) 69 : M(X) 70 { 71 arma_extra_debug_sigprint(); 72 } 73 74 const T1& M; 75 76 static constexpr bool do_inv = false; 77 static constexpr bool do_inv_sympd = false; 78 }; 79 80 81 82 template<typename T1> 83 struct strip_inv< Op<T1, op_inv> > 84 { 85 typedef T1 stored_type; 86 87 inline strip_invstrip_inv88 strip_inv(const Op<T1, op_inv>& X) 89 : M(X.m) 90 { 91 arma_extra_debug_sigprint(); 92 } 93 94 const T1& M; 95 96 static constexpr bool do_inv = true; 97 static constexpr bool do_inv_sympd = false; 98 }; 99 100 101 102 template<typename T1> 103 struct strip_inv< Op<T1, op_inv_sympd> > 104 { 105 typedef T1 stored_type; 106 107 inline strip_invstrip_inv108 strip_inv(const Op<T1, op_inv_sympd>& X) 109 : M(X.m) 110 { 111 arma_extra_debug_sigprint(); 112 } 113 114 const T1& M; 115 116 static constexpr bool do_inv = true; 117 static constexpr bool do_inv_sympd = true; 118 }; 119 120 121 122 template<typename T1> 123 struct strip_trimat 124 { 125 typedef T1 stored_type; 126 127 const T1& M; 128 129 static constexpr bool do_trimat = false; 130 static constexpr bool do_triu = false; 131 static constexpr bool do_tril = false; 132 133 inline strip_trimatstrip_trimat134 strip_trimat(const T1& X) 135 : M(X) 136 { 137 arma_extra_debug_sigprint(); 138 } 139 }; 140 141 142 143 template<typename T1> 144 struct strip_trimat< Op<T1, op_trimat> > 145 { 146 typedef T1 stored_type; 147 148 const T1& M; 149 150 static constexpr bool do_trimat = true; 151 152 const bool do_triu; 153 const bool do_tril; 154 155 inline strip_trimatstrip_trimat156 strip_trimat(const Op<T1, op_trimat>& X) 157 : M(X.m) 158 , do_triu(X.aux_uword_a == 0) 159 , do_tril(X.aux_uword_a == 1) 160 { 161 arma_extra_debug_sigprint(); 162 } 163 }; 164 165 166 167 //! @} 168