65 void applyH( Vector<Real> &Hv,
const Vector<Real> &v )
const {
70 if ( state->iter != 0 && state->current != -1 ) {
72 Real yy = state->gradDiff[state->current]->dot(*(state->gradDiff[state->current]));
73 Hv.scale(state->product[state->current]/yy);
75 else if ( type_ == 2 ) {
76 Real ss = state->iterDiff[state->current]->dot(*(state->iterDiff[state->current]));
77 Hv.scale(ss/state->product[state->current]);
83 void applyB( Vector<Real> &Bv,
const Vector<Real> &v )
const {
88 if ( state->iter != 0 && state->current != -1 ) {
90 Real yy = state->gradDiff[state->current]->dot(*(state->gradDiff[state->current]));
91 Bv.scale(yy/state->product[state->current]);
93 else if ( type_ == 2 ) {
94 Real ss = state->iterDiff[state->current]->dot(*(state->iterDiff[state->current]));
95 Bv.scale(state->product[state->current]/ss);