full_lu_solve_result(Input1& a, Input2& b, const char & trans) : a_(a) , b_(b) , lda_(a_.leading_size()) , ldb_(b_.leading_size()) , n_(height(a_)) , nrhs_(width(b_)) , x_(nt2::of_size(n_, nrhs_)) , ipiv_(nt2::of_size(n_, 1)) , af_(nt2::of_size(n_, n_)) , ferr_( nt2::of_size(n_, 1)) , berr_( nt2::of_size(n_, 1)) , r_( nt2::of_size(n_, 1)) , c_( nt2::of_size(n_, 1)) { char fact = 'N'; char equed = 'N'; nt2_la_int ldaf = af_.leading_size(); nt2_la_int ldx = x_.leading_size(); nt2::details::gesvx (&fact, &trans, &n_, &nrhs_, a_.raw(), &lda_, af_.raw(), &ldaf, ipiv_.raw(), &equed, r_.raw(), c_.raw(), b_.raw(), &ldb_, x_.raw(), &ldx, &rcond_, ferr_.raw(), berr_.raw(), &info_); NT2_WARNING(info_ <= 0, "Warning: Matrix is singular to working precision."); }
symeig_result ( Input& xpr, char jobz/* = 'V'*/, char uplo/* = 'U'*/) : jobz_(jobz == 'V' ? 'V':'N') , uplo_(uplo == 'L' ? 'L':'U') , a_(xpr) , aa_(xpr) , n_( nt2::height(xpr) ) , w_(of_size(1, n_)) , lda_( aa_.leading_size() ) , info_(0) { NT2_WARNING(nt2::issymetric(a_)||(uplo == 'L'), "in symeig input is not symetric: only the upper matrix part will be used"); NT2_WARNING(nt2::issymetric(a_)||(uplo == 'U'), "in symeig input is not symetric: only the lower matrix part will be used"); nt2::details::hsev(&jobz_, &uplo_, &n_, aa_.raw(), &lda_, w_.raw(), &info_, wrk_); }