ROL
ROL::QuadraticObjective< Real > Class Template Reference

Provides the interface to evaluate quadratic objective functions. More...

#include <ROL_QuadraticObjective.hpp>

Inheritance diagram for ROL::QuadraticObjective< Real >:

Public Member Functions

 QuadraticObjective (const Ptr< const LinearOperator< Real > > &H, const Ptr< const Vector< Real > > &g, Real c=Real(0))
Real value (const Vector< Real > &x, Real &tol) override
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) override
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Public Member Functions inherited from ROL::ROL::Objective< Real >
virtual ~Objective ()
 Objective ()
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function.
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function.
virtual Real value (const Vector< Real > &x, Real &tol)=0
 Compute value.
virtual void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative.
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector.
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply inverse Hessian approximation to vector.
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector.
virtual void prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
 Compute the proximity operator.
virtual void proxJacVec (Vector< Real > &Jv, const Vector< Real > &v, const Vector< Real > &x, Real t, Real &tol)
 Apply the Jacobian of the proximity operator.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes.
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check.
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check.
virtual std::vector< std::vector< Real > > checkProxJacVec (const Vector< Real > &x, const Vector< Real > &v, Real t=Real(1), bool printToStream=true, std::ostream &outStream=std::cout, int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference proximity operator Jacobian-applied-to-vector check.
virtual void setParameter (const std::vector< Real > &param)

Private Attributes

const Ptr< const LinearOperator< Real > > H_
const Ptr< const Vector< Real > > g_
const Real c_
Ptr< Vector< Real > > tmp_

Additional Inherited Members

Protected Member Functions inherited from ROL::ROL::Objective< Real >
const std::vector< Real > getParameter (void) const

Detailed Description

template<typename Real>
class ROL::QuadraticObjective< Real >

Provides the interface to evaluate quadratic objective functions.

This class implements the quadratic objective function

\[ f(x) = \frac{1}{2}\langle Hx, x\rangle_{\mathcal{X}^*,\mathcal{X}} + \langle g, x\rangle_{\mathcal{X}^*,\mathcal{X}} + c \]

for fixed \(H\in\mathcal{L}(\mathcal{X},\mathcal{X}^*)\), \(g\in\mathcal{X}^*\), and \(c\in\mathbb{R}\).


Definition at line 37 of file ROL_QuadraticObjective.hpp.

Constructor & Destructor Documentation

◆ QuadraticObjective()

template<typename Real>
ROL::QuadraticObjective< Real >::QuadraticObjective ( const Ptr< const LinearOperator< Real > > & H,
const Ptr< const Vector< Real > > & g,
Real c = Real(0) )

Definition at line 16 of file ROL_QuadraticObjective_Def.hpp.

References c_, g_, H_, and tmp_.

Member Function Documentation

◆ value()

template<typename Real>
Real ROL::QuadraticObjective< Real >::value ( const Vector< Real > & x,
Real & tol )
override

Definition at line 24 of file ROL_QuadraticObjective_Def.hpp.

References ROL::Vector< Real >::apply(), c_, g_, H_, and tmp_.

◆ gradient()

template<typename Real>
void ROL::QuadraticObjective< Real >::gradient ( Vector< Real > & g,
const Vector< Real > & x,
Real & tol )
override

Definition at line 33 of file ROL_QuadraticObjective_Def.hpp.

References g_, H_, and ROL::Vector< Real >::plus().

◆ hessVec()

template<typename Real>
void ROL::QuadraticObjective< Real >::hessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
override

Definition at line 39 of file ROL_QuadraticObjective_Def.hpp.

References H_.

◆ invHessVec()

template<typename Real>
void ROL::QuadraticObjective< Real >::invHessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
override

Definition at line 44 of file ROL_QuadraticObjective_Def.hpp.

References H_.

Member Data Documentation

◆ H_

template<typename Real>
const Ptr<const LinearOperator<Real> > ROL::QuadraticObjective< Real >::H_
private

Definition at line 39 of file ROL_QuadraticObjective.hpp.

Referenced by gradient(), hessVec(), invHessVec(), QuadraticObjective(), and value().

◆ g_

template<typename Real>
const Ptr<const Vector<Real> > ROL::QuadraticObjective< Real >::g_
private

Definition at line 40 of file ROL_QuadraticObjective.hpp.

Referenced by gradient(), QuadraticObjective(), and value().

◆ c_

template<typename Real>
const Real ROL::QuadraticObjective< Real >::c_
private

Definition at line 41 of file ROL_QuadraticObjective.hpp.

Referenced by QuadraticObjective(), and value().

◆ tmp_

template<typename Real>
Ptr<Vector<Real> > ROL::QuadraticObjective< Real >::tmp_
private

Definition at line 42 of file ROL_QuadraticObjective.hpp.

Referenced by QuadraticObjective(), and value().


The documentation for this class was generated from the following files: