44 #ifndef ROL_BARZILAIBORWEIN_H
45 #define ROL_BARZILAIBORWEIN_H
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]);
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);
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 applyH(Vector< Real > &Hv, const Vector< Real > &v) const
Defines the linear algebra or vector space interface.
ROL::Ptr< SecantState< Real > > & get_state()
Provides interface for and implements limited-memory secant operators.
void applyB(Vector< Real > &Bv, const Vector< Real > &v) const
Provides definitions for Barzilai-Borwein operators.
virtual void set(const Vector &x)
Set where .
BarzilaiBorwein(int type=1)