"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/op_powmat_meat.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.

op_powmat_meat.hpp  (armadillo-10.8.2.tar.xz):op_powmat_meat.hpp  (armadillo-11.0.0.tar.xz)
skipping to change at line 53 skipping to change at line 53
op_powmat::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1 ::elem_type,T1>& X, const uword y, const bool y_neg) op_powmat::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1 ::elem_type,T1>& X, const uword y, const bool y_neg)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
if(y_neg) if(y_neg)
{ {
if(y == uword(1)) if(y == uword(1))
{ {
return op_inv::apply_direct(out, X.get_ref(), "powmat()"); return op_inv_gen_default::apply_direct(out, X.get_ref(), "powmat()");
} }
else else
{ {
Mat<eT> X_inv; Mat<eT> X_inv;
const bool inv_status = op_inv::apply_direct(X_inv, X.get_ref(), "powmat() "); const bool inv_status = op_inv_gen_default::apply_direct(X_inv, X.get_ref( ), "powmat()");
if(inv_status == false) { return false; } if(inv_status == false) { return false; }
op_powmat::apply_direct_positive(out, X_inv, y); op_powmat::apply_direct_positive(out, X_inv, y);
} }
} }
else else
{ {
const quasi_unwrap<T1> U(X.get_ref()); const quasi_unwrap<T1> U(X.get_ref());
skipping to change at line 199 skipping to change at line 199
for(uword i=0; i<N; ++i) { tmp[i] = eop_aux::pow( std::complex<in_T>(A.at(i ,i)), y) ; } for(uword i=0; i<N; ++i) { tmp[i] = eop_aux::pow( std::complex<in_T>(A.at(i ,i)), y) ; }
out.zeros(N,N); out.zeros(N,N);
for(uword i=0; i<N; ++i) { out.at(i,i) = tmp[i]; } for(uword i=0; i<N; ++i) { out.at(i,i) = tmp[i]; }
return true; return true;
} }
#if defined(ARMA_OPTIMISE_SYMPD) const bool try_sympd = arma_config::optimise_sympd && sympd_helper::guess_symp
const bool try_sympd = sympd_helper::guess_sympd(A); d(A);
#else
const bool try_sympd = false;
#endif
if(try_sympd) if(try_sympd)
{ {
arma_extra_debug_print("op_powmat_cx: attempting sympd optimisation"); arma_extra_debug_print("op_powmat_cx: attempting sympd optimisation");
Col<in_T> eigval; Col<in_T> eigval;
Mat<in_eT> eigvec; Mat<in_eT> eigvec;
const bool eig_status = eig_sym(eigval, eigvec, A); const bool eig_status = eig_sym(eigval, eigvec, A);
 End of changes. 3 change blocks. 
7 lines changed or deleted 4 lines changed or added

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