ROL
ROL_PQNObjective.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Rapid Optimization Library (ROL) Package
4 //
5 // Copyright 2014 NTESS and the ROL contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef ROL_PQNOBJECTIVE_H
11 #define ROL_PQNOBJECTIVE_H
12 
13 #include "ROL_Objective.hpp"
14 #include "ROL_Secant.hpp"
15 
33 namespace ROL {
34 
35 template<typename Real>
36 class PQNObjective : public Objective<Real> {
37 private:
38  const Ptr<Secant<Real>> secant_;
39  const Ptr<Vector<Real>> x_, g_, pwa_, dwa_;
40 
41 public:
42  PQNObjective(const Ptr<Secant<Real>> &secant,
43  const Vector<Real> &x,
44  const Vector<Real> &g);
45 
46  Real value( const Vector<Real> &x, Real &tol ) override;
47  void gradient( Vector<Real> &g, const Vector<Real> &x, Real &tol ) override;
48  void hessVec( Vector<Real> &hv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
49 
50  void setAnchor(const Vector<Real> &x, const Vector<Real> &g);
51 }; // class PQNObjective
52 
53 } // namespace ROL
54 
55 #include "ROL_PQNObjective_Def.hpp"
56 
57 #endif
Provides the interface to evaluate objective functions.
Provides the interface to evaluate the quadratic quasi-Newton objective.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
PQNObjective(const Ptr< Secant< Real >> &secant, const Vector< Real > &x, const Vector< Real > &g)
const Ptr< Vector< Real > > x_
Provides interface for and implements limited-memory secant operators.
Definition: ROL_Secant.hpp:45
const Ptr< Secant< Real > > secant_
void setAnchor(const Vector< Real > &x, const Vector< Real > &g)
const Ptr< Vector< Real > > dwa_
const Ptr< Vector< Real > > g_
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
const Ptr< Vector< Real > > pwa_
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.