44 #ifndef ROL_BARZILAIBORWEIN_H
45 #define ROL_BARZILAIBORWEIN_H
68 if ( state->iter != 0 && state->current != -1 ) {
70 Real yy = state->gradDiff[state->current]->dot(*(state->gradDiff[state->current]));
71 Hv.
scale(state->product[state->current]/yy);
73 else if (
type_ == 2 ) {
74 Real ss = state->iterDiff[state->current]->dot(*(state->iterDiff[state->current]));
75 Hv.
scale(ss/state->product[state->current]);
86 if ( state->iter != 0 && state->current != -1 ) {
88 Real yy = state->gradDiff[state->current]->dot(*(state->gradDiff[state->current]));
89 Bv.
scale(yy/state->product[state->current]);
91 else if (
type_ == 2 ) {
92 Real ss = state->iterDiff[state->current]->dot(*(state->iterDiff[state->current]));
93 Bv.
scale(state->product[state->current]/ss);
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual void scale(const Real alpha)=0
Compute where .
void applyB(Vector< Real > &Bv, const Vector< Real > &v, const Vector< Real > &x)
Defines the linear algebra or vector space interface.
Provides interface for and implements limited-memory secant operators.
Teuchos::RCP< SecantState< Real > > & get_state()
Provides definitions for Barzilai-Borwein operators.
virtual void set(const Vector &x)
Set where .
void applyH(Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &x)
BarzilaiBorwein(int type=1)