50 inline int sign(
double v) {
69 throw std::length_error(
"update_chol_factor(): Sizes of matrix and vectors do not match");
80 while(*r_itr_u == 0.0 && k > 1) --k;
86 r_itr_u_i =
u(1,k-1).rbegin(),
87 r_itr_u_ip1 =
u(2,k).rbegin();
88 for(
size_type i = k-1; i > 0 ; ++r_itr_u_i, ++r_itr_u_ip1, --i) {
89 value_type u_i = *r_itr_u_i, u_ip1 = *r_itr_u_ip1;
91 *r_itr_u_i = (u_i == 0.0) ? ::fabs(u_ip1) :
::sqrt(u_i * u_i + u_ip1 * u_ip1);
179 itr_M_i = M.
row(i)(i,n).begin(),
180 itr_M_i_end = M.
row(i)(i,n).end(),
181 itr_M_ip1 = M.
row(i+1)(i,n).begin();
183 while(itr_M_i != itr_M_i_end) {
185 *itr_M_i++ = c * y - s *
w;
186 *itr_M_ip1++ = s * y + c *
w;
Teuchos::Ordinal size_type
Typedef for the size type of elements that are used by the library.
void assert_gms_square(const DMatrixSlice &gms)
Assert a matrix is square and throws length_error if it is not (LINALGPACK_CHECK_SLICE_SETUP).
reverse_iterator rbegin()
void Vp_StV(DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
vs_lhs += alpha * vs_rhs (BLAS xAXPY)
void sign(const Vector &v, VectorMutable *z)
Compute the sign of each element in an input vector.
size_type dim() const
Returns the number of elements of the VectorSliceTmpl.
void jacobi_rotate(DMatrixSlice *UpTriM, size_type row_i, value_type alpha, value_type beta)
C++ Standard Library compatable iterator class for accesing nonunit stride arrays of data...
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec f_int f_int f_dbl_prec w[]
const LAPACK_C_Decl::f_int & M
std::reverse_iterator< iterator > reverse_iterator
void sqrt(DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
vs_lhs = sqrt(vs_rhs)
size_type rows() const
Return the number of rows.
DVectorSlice diag(difference_type k=0)
FortranTypes::f_dbl_prec value_type
Typedef for the value type of elements that is used for the library.
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec & u
void update_chol_factor(DMatrixSlice *UpTriM, DVectorSlice *u, const DVectorSlice &v)
DVectorSlice row(size_type i)
Return DVectorSlice object representing the ith row (1-based; 1,2,..,#this->rows()#, or throw std::out_of_range)