145 if( opR_uplo == lower ) {
162 for( ; k != last_i+di; k+=di )
163 if( (*u)(k) != 0.0 )
break;
164 if( k == last_i+di )
return;
169 {
for(
size_type i = k; i != last_i; i+=di ) {
173 rotg( &(*u)(i+di), &(*u)(i), &c, &s );
177 opR_row_idi =
row(R->
gms(),R_trans,i+di),
178 opR_row_i =
row(R->
gms(),R_trans,i);
179 if( opR_uplo == lower ) {
183 rot( c, s, &opR_row_idi(1 ,i ), &opR_row_i(1,i) );
184 rot( c, s, &opR_row_idi(i+1,i+1), &(*w)(i+wo,i+wo) );
190 rot( c, s, &opR_row_idi(i-1,i-1), &(*w)(i+wo,i+wo) );
191 rot( c, s, &opR_row_idi(i ,n ), &opR_row_i(i,n) );
197 Vp_StV( &
row(R->
gms(),R_trans,last_i), a * (*u)(last_i), v );
203 {
for(
size_type i = last_i; i != k; i-=di ) {
205 opR_row_i =
row(R->
gms(),R_trans,i),
206 opR_row_idi =
row(R->
gms(),R_trans,i-di);
208 &w_idiwo = (*w)(i-di+wo);
213 rotg( &R_i_i, &w_idiwo, &c, &s );
223 if( opR_uplo == lower ) {
227 rot( scale*c, scale*s, &opR_row_i(1,i-1), &opR_row_idi(1,i-1) );
233 rot( scale*c, scale*s, &opR_row_i(i+1,n), &opR_row_idi(i+1,n) );
DVectorSlice row(DMatrixSlice &gms, BLAS_Cpp::Transp trans, size_type i)
void Vp_StV(DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
vs_lhs += alpha * vs_rhs (BLAS xAXPY)
size_type dim() const
Returns the number of elements of the VectorSliceTmpl.
void rot(const f_int &N, f_dbl_prec *X, const f_int &INCX, f_dbl_prec *Y, const f_int &INCY, const f_dbl_prec &C, const f_dbl_prec &S)
RTOp_value_type value_type
void rotg(f_dbl_prec *a, f_dbl_prec *b, f_dbl_prec *c, f_dbl_prec *s)
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
void Mp_M_assert_sizes(size_type m_lhs_rows, size_type m_lhs_cols, BLAS_Cpp::Transp trans_lhs, size_type m_rhs_rows, size_type m_rhs_cols, BLAS_Cpp::Transp trans_rhs)
op(m_lhs) += op op(m_rhs)
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[]
RTOp_index_type size_type
BLAS_Cpp::Uplo uplo() const
void rank_2_chol_update(const value_type a, DVectorSlice *u, const DVectorSlice &v, DVectorSlice *w, DMatrixSliceTriEle *R, BLAS_Cpp::Transp R_trans)
Update the cholesky factor of symmetric positive definite matrix for a rank-2 update.
DVectorSlice col(DMatrixSlice &gms, BLAS_Cpp::Transp trans, size_type j)
const f_int f_dbl_prec a[]
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec & u
void rot(const value_type c, const value_type s, DVectorSlice *x, DVectorSlice *y)