23 inline static typename T1::elem_type
apply(
const T1& X);
31 template<
typename T1,
typename T2>
39 template<
typename T1,
typename T2,
typename T3>
48 typename T1::elem_type
53 typedef typename T1::elem_type eT;
65 template<
typename T1,
typename T2>
67 typename T1::elem_type
72 typedef typename T1::elem_type eT;
91 arma_debug_check( (A_n_rows != 1) || (B_n_cols != 1) || (A_n_cols != B_n_rows),
"as_scalar(): incompatible dimensions" );
98 template<
typename T1,
typename T2,
typename T3>
100 typename T1::elem_type
105 typedef typename T1::elem_type eT;
116 const bool tmp2_do_inv = strip1.
do_inv;
117 const bool tmp2_do_diagmat = strip2.
do_diagmat;
119 if(tmp2_do_diagmat ==
false)
140 const bool B_is_vec = B.
is_vec();
154 (A_n_cols != B_n_rows) ||
155 (B_n_cols != C_n_rows)
157 "as_scalar(): incompatible dimensions" 163 if(tmp2_do_inv ==
true)
174 if(tmp2_do_inv ==
true)
188 template<
typename T1>
190 typename T1::elem_type
195 typedef typename T1::elem_type eT;
200 arma_debug_check( (A.n_elem != 1),
"as_scalar(): expression doesn't evaluate to exactly one element" );
207 template<
typename T1,
typename T2,
typename T3>
209 typename T1::elem_type
214 typedef typename T1::elem_type eT;
235 const bool B_is_vec = B.
is_vec();
249 (A_n_cols != B_n_rows) ||
250 (B_n_cols != C_n_rows)
252 "as_scalar(): incompatible dimensions" 268 template<
typename T1,
typename T2>
271 typename T1::elem_type
293 template<
typename T1>
296 typename T1::elem_type
301 typedef typename T1::elem_type eT;
306 arma_debug_check( (A.n_elem != 1),
"as_scalar(): expression doesn't evaluate to exactly one element" );
313 template<
typename T1>
316 typename T1::elem_type
326 template<
typename T1>
329 typename T1::elem_type
334 typedef typename T1::elem_type eT;
339 arma_debug_check( (A.n_elem != 1),
"as_scalar(): expression doesn't evaluate to exactly one element" );
arma_inline arma_warn_unused bool is_vec() const
returns true if the object can be interpreted as a column or row vector
Class which implements the immediate multiplication of two or more matrices.
static eT direct_rowvec_invdiagvec_colvec(const eT *A_mem, const Mat< eT > &B, const eT *C_mem)
arma_inline const derived & get_ref() const
arma_hot static arma_pure arma_float_only< eT >::result direct_dot(const uword n_elem, const eT *const A, const eT *const B)
arma_aligned const Proxy< T1 > P
const uword n_cols
number of columns in the matrix (read-only)
static eT direct_rowvec_invdiagmat_colvec(const eT *A_mem, const Mat< eT > &B, const eT *C_mem)
const uword n_elem
number of elements in the matrix (read-only)
const uword n_rows
number of rows in the matrix (read-only)
#define arma_extra_debug_print
static const bool do_diagmat
static eT direct_rowvec_diagmat_colvec(const eT *A_mem, const Mat< eT > &B, const eT *C_mem)
const T1 & A
first operand
static const bool do_trans
T1::elem_type as_scalar_diag(const Base< typename T1::elem_type, T1 > &X)
#define arma_ignore(variable)
const T2 & B
second operand
arma_inline arma_warn_unused T1::elem_type as_scalar(const Glue< T1, T2, glue_times > &X, const typename arma_not_cx< typename T1::elem_type >::result *junk=0)
#define arma_extra_debug_sigprint
Analog of the Base class, intended for cubes.
arma_inline const derived & get_ref() const
arma_aligned const eT *const mem
pointer to the memory used by the matrix (memory is read-only)
Template metaprogram depth_lhs calculates the number of Glue<Tx,Ty, glue_type> instances on the left ...
static T1::elem_type apply(const T1 &X)