44 #ifndef ROL_PQNOBJECTIVEDEF_H
45 #define ROL_PQNOBJECTIVEDEF_H
50 template<
typename Real>
54 : secant_(secant), x_(x.clone()), g_(g.clone()), pwa_(x.clone()), dwa_(g.clone()) {
58 template<
typename Real>
61 pwa_->axpy(static_cast<Real>(-1),*x_);
62 secant_->applyB(*dwa_, *pwa_);
63 dwa_->scale(static_cast<Real>(0.5));
65 return dwa_->apply(*pwa_);
68 template<
typename Real>
71 pwa_->axpy(static_cast<Real>(-1),*x_);
72 secant_->applyB(g, *pwa_);
76 template<
typename Real>
78 secant_->applyB(hv, v);
81 template<
typename Real>
83 x_->set(x); g_->set(g);
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
virtual void plus(const Vector &x)=0
Compute , where .
Defines the linear algebra or vector space interface.
PQNObjective(const Ptr< Secant< Real >> &secant, const Vector< Real > &x, const Vector< Real > &g)
Provides interface for and implements limited-memory secant operators.
void setAnchor(const Vector< Real > &x, const Vector< Real > &g)
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.