ROL
ROL::MomentObjective< Real > Class Template Reference

#include <ROL_MomentObjective.hpp>

Inheritance diagram for ROL::MomentObjective< Real >:

Public Member Functions

 MomentObjective (const std::vector< std::vector< std::pair< int, Real > > > &moments, const ROL::Ptr< BatchManager< Real > > &bman, const bool optProb=true, const bool optAtom=true)
 MomentObjective (const std::vector< ROL::Ptr< Distribution< Real > > > &dist, const std::vector< int > &order, const ROL::Ptr< BatchManager< Real > > &bman, const bool optProb=true, const bool optAtom=true)
Real value (const Vector< Real > &x, Real &tol)
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
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 Member Functions

Real momentValue (const int dim, const Real power, const Real moment, const ProbabilityVector< Real > &prob, const AtomVector< Real > &atom) const
void momentGradient (std::vector< Real > &gradx, std::vector< Real > &gradp, Real &scale, const int dim, const Real power, const Real moment, const ProbabilityVector< Real > &prob, const AtomVector< Real > &atom) const
void momentHessVec (std::vector< Real > &hvx1, std::vector< Real > &hvx2, std::vector< Real > &hvx3, std::vector< Real > &hvp1, std::vector< Real > &hvp2, Real &scale1, Real &scale2, Real &scale3, const int dim, const Real power, const Real moment, const ProbabilityVector< Real > &prob, const AtomVector< Real > &atom, const ProbabilityVector< Real > &vprob, const AtomVector< Real > &vatom) const

Private Attributes

std::vector< std::vector< std::pair< int, Real > > > moments_
ROL::Ptr< BatchManager< Real > > bman_
int dimension_
int numMoments_
const bool optProb_
const bool optAtom_

Additional Inherited Members

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

Detailed Description

template<class Real>
class ROL::MomentObjective< Real >

Definition at line 23 of file ROL_MomentObjective.hpp.

Constructor & Destructor Documentation

◆ MomentObjective() [1/2]

template<class Real>
ROL::MomentObjective< Real >::MomentObjective ( const std::vector< std::vector< std::pair< int, Real > > > & moments,
const ROL::Ptr< BatchManager< Real > > & bman,
const bool optProb = true,
const bool optAtom = true )
inline

◆ MomentObjective() [2/2]

template<class Real>
ROL::MomentObjective< Real >::MomentObjective ( const std::vector< ROL::Ptr< Distribution< Real > > > & dist,
const std::vector< int > & order,
const ROL::Ptr< BatchManager< Real > > & bman,
const bool optProb = true,
const bool optAtom = true )
inline

Member Function Documentation

◆ momentValue()

template<class Real>
Real ROL::MomentObjective< Real >::momentValue ( const int dim,
const Real power,
const Real moment,
const ProbabilityVector< Real > & prob,
const AtomVector< Real > & atom ) const
inlineprivate

◆ momentGradient()

template<class Real>
void ROL::MomentObjective< Real >::momentGradient ( std::vector< Real > & gradx,
std::vector< Real > & gradp,
Real & scale,
const int dim,
const Real power,
const Real moment,
const ProbabilityVector< Real > & prob,
const AtomVector< Real > & atom ) const
inlineprivate

◆ momentHessVec()

template<class Real>
void ROL::MomentObjective< Real >::momentHessVec ( std::vector< Real > & hvx1,
std::vector< Real > & hvx2,
std::vector< Real > & hvx3,
std::vector< Real > & hvp1,
std::vector< Real > & hvp2,
Real & scale1,
Real & scale2,
Real & scale3,
const int dim,
const Real power,
const Real moment,
const ProbabilityVector< Real > & prob,
const AtomVector< Real > & atom,
const ProbabilityVector< Real > & vprob,
const AtomVector< Real > & vatom ) const
inlineprivate

◆ value()

template<class Real>
Real ROL::MomentObjective< Real >::value ( const Vector< Real > & x,
Real & tol )
inline

◆ gradient()

◆ hessVec()

template<class Real>
void ROL::MomentObjective< Real >::hessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inline

Member Data Documentation

◆ moments_

template<class Real>
std::vector<std::vector<std::pair<int, Real> > > ROL::MomentObjective< Real >::moments_
private

Definition at line 25 of file ROL_MomentObjective.hpp.

Referenced by gradient(), hessVec(), MomentObjective(), MomentObjective(), and value().

◆ bman_

template<class Real>
ROL::Ptr<BatchManager<Real> > ROL::MomentObjective< Real >::bman_
private

◆ dimension_

template<class Real>
int ROL::MomentObjective< Real >::dimension_
private

Definition at line 27 of file ROL_MomentObjective.hpp.

Referenced by gradient(), hessVec(), MomentObjective(), MomentObjective(), and value().

◆ numMoments_

template<class Real>
int ROL::MomentObjective< Real >::numMoments_
private

Definition at line 28 of file ROL_MomentObjective.hpp.

Referenced by gradient(), hessVec(), MomentObjective(), MomentObjective(), and value().

◆ optProb_

template<class Real>
const bool ROL::MomentObjective< Real >::optProb_
private

Definition at line 29 of file ROL_MomentObjective.hpp.

Referenced by gradient(), hessVec(), MomentObjective(), and MomentObjective().

◆ optAtom_

template<class Real>
const bool ROL::MomentObjective< Real >::optAtom_
private

Definition at line 30 of file ROL_MomentObjective.hpp.

Referenced by gradient(), hessVec(), MomentObjective(), and MomentObjective().


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