ROL
Public Member Functions | Private Attributes | List of all members
ROL::LinearObjective_SimOpt< Real > Class Template Reference

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

#include <ROL_LinearObjective_SimOpt.hpp>

+ Inheritance diagram for ROL::LinearObjective_SimOpt< Real >:

Public Member Functions

 LinearObjective_SimOpt (const Ptr< const Vector< Real >> &simcost=nullPtr, const Ptr< const Vector< Real >> &optcost=nullPtr)
 
Real value (const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Compute value. More...
 
void gradient_1 (Vector< Real > &g, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Compute gradient with respect to first component. More...
 
void gradient_2 (Vector< Real > &g, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Compute gradient with respect to second component. More...
 
void hessVec_11 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply Hessian approximation to vector. More...
 
void hessVec_12 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 
void hessVec_21 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 
void hessVec_22 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 
- Public Member Functions inherited from ROL::Objective_SimOpt< Real >
virtual void update (const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1)
 Update objective function. u is an iterate, z is an iterate, flag = true if the iterate has changed, iter is the outer algorithm iterations count. More...
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function. More...
 
Real value (const Vector< Real > &x, Real &tol)
 Compute value. More...
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient. More...
 
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector. More...
 
std::vector< std::vector< Real > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative. More...
 
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply inverse Hessian approximation to vector. More...
 
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void setParameter (const std::vector< Real > &param)
 

Private Attributes

const Ptr< const Vector< Real > > simcost_
 
const Ptr< const Vector< Real > > optcost_
 

Additional Inherited Members

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

Detailed Description

template<class Real>
class ROL::LinearObjective_SimOpt< Real >

Provides the interface to evaluate linear objective functions.

This class implements the linear objective function

\[ f(x) = \langle c, x\rangle_{\mathcal{X}^*,\mathcal{X}} \]

for fixed \(c\in\mathcal{X}^*\).


Definition at line 66 of file ROL_LinearObjective_SimOpt.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::LinearObjective_SimOpt< Real >::LinearObjective_SimOpt ( const Ptr< const Vector< Real >> &  simcost = nullPtr,
const Ptr< const Vector< Real >> &  optcost = nullPtr 
)
inline

Definition at line 71 of file ROL_LinearObjective_SimOpt.hpp.

Member Function Documentation

template<class Real >
Real ROL::LinearObjective_SimOpt< Real >::value ( const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual
template<class Real >
void ROL::LinearObjective_SimOpt< Real >::gradient_1 ( Vector< Real > &  g,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Compute gradient with respect to first component.

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 86 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::Vector< Real >::set(), ROL::LinearObjective_SimOpt< Real >::simcost_, and ROL::Vector< Real >::zero().

template<class Real >
void ROL::LinearObjective_SimOpt< Real >::gradient_2 ( Vector< Real > &  g,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Compute gradient with respect to second component.

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 95 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::LinearObjective_SimOpt< Real >::optcost_, ROL::Vector< Real >::set(), and ROL::Vector< Real >::zero().

template<class Real >
void ROL::LinearObjective_SimOpt< Real >::hessVec_11 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Apply Hessian approximation to vector.

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 104 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::Vector< Real >::zero().

template<class Real >
void ROL::LinearObjective_SimOpt< Real >::hessVec_12 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 108 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::Vector< Real >::zero().

template<class Real >
void ROL::LinearObjective_SimOpt< Real >::hessVec_21 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 112 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::Vector< Real >::zero().

template<class Real >
void ROL::LinearObjective_SimOpt< Real >::hessVec_22 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlinevirtual

Reimplemented from ROL::Objective_SimOpt< Real >.

Definition at line 116 of file ROL_LinearObjective_SimOpt.hpp.

References ROL::Vector< Real >::zero().

Member Data Documentation

template<class Real >
const Ptr<const Vector<Real> > ROL::LinearObjective_SimOpt< Real >::simcost_
private
template<class Real >
const Ptr<const Vector<Real> > ROL::LinearObjective_SimOpt< Real >::optcost_
private

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