"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/fn_as_scalar.hpp" between
armadillo-10.8.2.tar.xz and armadillo-11.0.0.tar.xz

About: Armadillo is a C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use.

fn_as_scalar.hpp  (armadillo-10.8.2.tar.xz):fn_as_scalar.hpp  (armadillo-11.0.0.tar.xz)
skipping to change at line 131 skipping to change at line 131
// T1 * T2 must result in a matrix with one row // T1 * T2 must result in a matrix with one row
// T3 must result in a matrix with one column // T3 must result in a matrix with one column
typedef typename strip_inv <T2 >::stored_type T2_stripped_1; typedef typename strip_inv <T2 >::stored_type T2_stripped_1;
typedef typename strip_diagmat<T2_stripped_1>::stored_type T2_stripped_2; typedef typename strip_diagmat<T2_stripped_1>::stored_type T2_stripped_2;
const strip_inv <T2> strip1(X.A.B); const strip_inv <T2> strip1(X.A.B);
const strip_diagmat<T2_stripped_1> strip2(strip1.M); const strip_diagmat<T2_stripped_1> strip2(strip1.M);
const bool tmp2_do_inv = strip1.do_inv; const bool tmp2_do_inv_gen = strip1.do_inv_gen && arma_config::optimise_invexp r;
const bool tmp2_do_diagmat = strip2.do_diagmat; const bool tmp2_do_diagmat = strip2.do_diagmat;
if(tmp2_do_diagmat == false) if(tmp2_do_diagmat == false)
{ {
const Mat<eT> tmp(X); const Mat<eT> tmp(X);
arma_debug_check( (tmp.n_elem != 1), "as_scalar(): expression must evaluate to exactly one element" ); arma_debug_check( (tmp.n_elem != 1), "as_scalar(): expression must evaluate to exactly one element" );
return tmp[0]; return tmp[0];
} }
skipping to change at line 177 skipping to change at line 177
(A_n_rows != 1) || (A_n_rows != 1) ||
(C_n_cols != 1) || (C_n_cols != 1) ||
(A_n_cols != B_n_rows) || (A_n_cols != B_n_rows) ||
(B_n_cols != C_n_rows) (B_n_cols != C_n_rows)
, ,
"as_scalar(): incompatible dimensions" "as_scalar(): incompatible dimensions"
); );
if(B_is_vec) if(B_is_vec)
{ {
if(tmp2_do_inv) if(tmp2_do_inv_gen)
{ {
return val * op_dotext::direct_rowvec_invdiagvec_colvec(A.mem, B, C.mem) ; return val * op_dotext::direct_rowvec_invdiagvec_colvec(A.mem, B, C.mem) ;
} }
else else
{ {
return val * op_dot::direct_dot(A.n_elem, A.mem, B.mem, C.mem); return val * op_dot::direct_dot(A.n_elem, A.mem, B.mem, C.mem);
} }
} }
else else
{ {
if(tmp2_do_inv) if(tmp2_do_inv_gen)
{ {
return val * op_dotext::direct_rowvec_invdiagmat_colvec(A.mem, B, C.mem) ; return val * op_dotext::direct_rowvec_invdiagmat_colvec(A.mem, B, C.mem) ;
} }
else else
{ {
return val * op_dotext::direct_rowvec_diagmat_colvec(A.mem, B, C.mem); return val * op_dotext::direct_rowvec_diagmat_colvec(A.mem, B, C.mem);
} }
} }
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)