51 #include "ROL_ParameterList.hpp"
60 std::vector<ROL::Ptr<Vector<Real> > >
iterDiff;
61 std::vector<ROL::Ptr<Vector<Real> > >
gradDiff;
82 state_ = ROL::makePtr<SecantState<Real>>();
94 const Real snorm,
const int iter ) {
102 ROL::Ptr<Vector<Real> > gradDiff = grad.
clone();
104 gradDiff->axpy(-one,gp);
106 Real sy = s.
dot(gradDiff->dual());
107 if (sy > ROL_EPSILON<Real>()*snorm*snorm) {
120 state_->product.push_back(sy);
150 ROL::Ptr<Vector<Real> > vec = x.
clone();
151 ROL::Ptr<Vector<Real> > Hvec = x.
clone();
152 ROL::Ptr<Vector<Real> > Bvec = x.
clone();
159 vec->axpy(-one,*Bvec);
160 std::cout <<
" ||BHv-v|| = " << vec->norm() <<
"\n";
166 vec->axpy(-one,*Hvec);
167 std::cout <<
" ||HBv-v|| = " << vec->norm() <<
"\n";
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 .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
ROL::Ptr< SecantState< Real > > state_
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
Contains definitions of custom data types in ROL.
virtual void applyH(Vector< Real > &Hv, const Vector< Real > &v) const =0
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
ROL::Ptr< SecantState< Real > > & get_state()
ROL::Ptr< Vector< Real > > iterate
virtual void applyB0(Vector< Real > &Bv, const Vector< Real > &v) const
std::vector< ROL::Ptr< Vector< Real > > > gradDiff
Provides interface for and implements limited-memory secant operators.
virtual void updateStorage(const Vector< Real > &x, const Vector< Real > &grad, const Vector< Real > &gp, const Vector< Real > &s, const Real snorm, const int iter)
std::vector< Real > product2
virtual void applyB(Vector< Real > &Bv, const Vector< Real > &v) const =0
void test(const Vector< Real > &x, const Vector< Real > &s) const
Provides the interface to apply a linear operator.
virtual void applyH0(Vector< Real > &Hv, const Vector< Real > &v) const
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
std::vector< ROL::Ptr< Vector< Real > > > iterDiff
virtual void set(const Vector &x)
Set where .
std::vector< Real > product
const ROL::Ptr< SecantState< Real > > & get_state() const