10 #ifndef ROL_PQNOBJECTIVEDEF_H
11 #define ROL_PQNOBJECTIVEDEF_H
16 template<
typename Real>
20 : secant_(secant), x_(x.clone()), g_(g.clone()), pwa_(x.clone()), dwa_(g.clone()) {
24 template<
typename Real>
27 pwa_->axpy(static_cast<Real>(-1),*x_);
28 secant_->applyB(*dwa_, *pwa_);
29 dwa_->scale(static_cast<Real>(0.5));
31 return dwa_->apply(*pwa_);
34 template<
typename Real>
37 pwa_->axpy(static_cast<Real>(-1),*x_);
38 secant_->applyB(g, *pwa_);
42 template<
typename Real>
44 secant_->applyB(hv, v);
47 template<
typename Real>
49 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.