ROL
ROL::StochasticObjective< Real > Class Template Reference

#include <ROL_StochasticObjective.hpp>

Inheritance diagram for ROL::StochasticObjective< Real >:

Public Member Functions

virtual ~StochasticObjective ()
 StochasticObjective (const Ptr< Objective< Real > > &obj, const Ptr< RandVarFunctional< Real > > &rvf, const Ptr< SampleGenerator< Real > > &vsampler, const Ptr< SampleGenerator< Real > > &gsampler, const Ptr< SampleGenerator< Real > > &hsampler, const bool storage=true, const int comp=0, const int index=0)
 StochasticObjective (const Ptr< Objective< Real > > &obj, const Ptr< RandVarFunctional< Real > > &rvf, const Ptr< SampleGenerator< Real > > &vsampler, const Ptr< SampleGenerator< Real > > &gsampler, const bool storage=true, const int comp=0, const int index=0)
 StochasticObjective (const Ptr< Objective< Real > > &obj, const Ptr< RandVarFunctional< Real > > &rvf, const Ptr< SampleGenerator< Real > > &sampler, const bool storage=true, const int comp=0, const int index=0)
 StochasticObjective (const Ptr< Objective< Real > > &obj, ParameterList &parlist, const Ptr< SampleGenerator< Real > > &vsampler, const Ptr< SampleGenerator< Real > > &gsampler, const Ptr< SampleGenerator< Real > > &hsampler, const int comp=0, const int index=0)
 StochasticObjective (const Ptr< Objective< Real > > &obj, ROL::ParameterList &parlist, const Ptr< SampleGenerator< Real > > &vsampler, const Ptr< SampleGenerator< Real > > &gsampler, const int comp=0, const int index=0)
 StochasticObjective (const Ptr< Objective< Real > > &obj, ROL::ParameterList &parlist, const Ptr< SampleGenerator< Real > > &sampler, const int comp=0, const int index=0)
Real computeStatistic (const Vector< Real > &x) const
void setIndex (int ind)
void update (const Vector< Real > &x, UpdateType type, int iter=-1)
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
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)
virtual void precond (Vector< Real > &Pv, 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

Ptr< const Vector< Real > > getConstVector (const Vector< Real > &x) const
Ptr< Vector< Real > > getVector (Vector< Real > &x) const
Ptr< const std::vector< Real > > getConstStat (const Vector< Real > &x) const
Ptr< std::vector< Real > > getStat (Vector< Real > &x) const

Private Attributes

Ptr< Objective< Real > > obj_
Ptr< RandVarFunctional< Real > > rvf_
Ptr< SampleGenerator< Real > > vsampler_
Ptr< SampleGenerator< Real > > gsampler_
Ptr< SampleGenerator< Real > > hsampler_
const int comp_
int index_

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::StochasticObjective< Real >

Definition at line 22 of file ROL_StochasticObjective.hpp.

Constructor & Destructor Documentation

◆ ~StochasticObjective()

template<class Real>
virtual ROL::StochasticObjective< Real >::~StochasticObjective ( )
inlinevirtual

Definition at line 65 of file ROL_StochasticObjective.hpp.

◆ StochasticObjective() [1/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
const Ptr< RandVarFunctional< Real > > & rvf,
const Ptr< SampleGenerator< Real > > & vsampler,
const Ptr< SampleGenerator< Real > > & gsampler,
const Ptr< SampleGenerator< Real > > & hsampler,
const bool storage = true,
const int comp = 0,
const int index = 0 )
inline

◆ StochasticObjective() [2/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
const Ptr< RandVarFunctional< Real > > & rvf,
const Ptr< SampleGenerator< Real > > & vsampler,
const Ptr< SampleGenerator< Real > > & gsampler,
const bool storage = true,
const int comp = 0,
const int index = 0 )
inline

◆ StochasticObjective() [3/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
const Ptr< RandVarFunctional< Real > > & rvf,
const Ptr< SampleGenerator< Real > > & sampler,
const bool storage = true,
const int comp = 0,
const int index = 0 )
inline

◆ StochasticObjective() [4/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
ParameterList & parlist,
const Ptr< SampleGenerator< Real > > & vsampler,
const Ptr< SampleGenerator< Real > > & gsampler,
const Ptr< SampleGenerator< Real > > & hsampler,
const int comp = 0,
const int index = 0 )
inline

◆ StochasticObjective() [5/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
ROL::ParameterList & parlist,
const Ptr< SampleGenerator< Real > > & vsampler,
const Ptr< SampleGenerator< Real > > & gsampler,
const int comp = 0,
const int index = 0 )
inline

◆ StochasticObjective() [6/6]

template<class Real>
ROL::StochasticObjective< Real >::StochasticObjective ( const Ptr< Objective< Real > > & obj,
ROL::ParameterList & parlist,
const Ptr< SampleGenerator< Real > > & sampler,
const int comp = 0,
const int index = 0 )
inline

Member Function Documentation

◆ getConstVector()

template<class Real>
Ptr< const Vector< Real > > ROL::StochasticObjective< Real >::getConstVector ( const Vector< Real > & x) const
inlineprivate

Definition at line 36 of file ROL_StochasticObjective.hpp.

References ROL::RiskVector< Real >::getVector().

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

◆ getVector()

template<class Real>
Ptr< Vector< Real > > ROL::StochasticObjective< Real >::getVector ( Vector< Real > & x) const
inlineprivate

Definition at line 41 of file ROL_StochasticObjective.hpp.

References ROL::RiskVector< Real >::getVector().

Referenced by gradient(), and hessVec().

◆ getConstStat()

template<class Real>
Ptr< const std::vector< Real > > ROL::StochasticObjective< Real >::getConstStat ( const Vector< Real > & x) const
inlineprivate

◆ getStat()

template<class Real>
Ptr< std::vector< Real > > ROL::StochasticObjective< Real >::getStat ( Vector< Real > & x) const
inlineprivate

Definition at line 55 of file ROL_StochasticObjective.hpp.

References comp_, ROL::RiskVector< Real >::getStatistic(), and index_.

Referenced by gradient(), and hessVec().

◆ computeStatistic()

template<class Real>
Real ROL::StochasticObjective< Real >::computeStatistic ( const Vector< Real > & x) const
inline

Definition at line 130 of file ROL_StochasticObjective.hpp.

References getConstStat(), and rvf_.

◆ setIndex()

template<class Real>
void ROL::StochasticObjective< Real >::setIndex ( int ind)
inline

Definition at line 135 of file ROL_StochasticObjective.hpp.

References index_.

◆ update() [1/2]

template<class Real>
void ROL::StochasticObjective< Real >::update ( const Vector< Real > & x,
UpdateType type,
int iter = -1 )
inline

◆ update() [2/2]

template<class Real>
void ROL::StochasticObjective< Real >::update ( const Vector< Real > & x,
bool flag = true,
int iter = -1 )
inline

Definition at line 153 of file ROL_StochasticObjective.hpp.

References getConstVector(), gsampler_, hsampler_, obj_, rvf_, and vsampler_.

◆ value()

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

Definition at line 167 of file ROL_StochasticObjective.hpp.

References getConstStat(), getConstVector(), obj_, rvf_, and vsampler_.

◆ gradient()

template<class Real>
void ROL::StochasticObjective< Real >::gradient ( Vector< Real > & g,
const Vector< Real > & x,
Real & tol )
inline

◆ hessVec()

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

◆ precond()

template<class Real>
virtual void ROL::StochasticObjective< Real >::precond ( Vector< Real > & Pv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inlinevirtual

Member Data Documentation

◆ obj_

template<class Real>
Ptr<Objective<Real> > ROL::StochasticObjective< Real >::obj_
private

◆ rvf_

template<class Real>
Ptr<RandVarFunctional<Real> > ROL::StochasticObjective< Real >::rvf_
private

◆ vsampler_

template<class Real>
Ptr<SampleGenerator<Real> > ROL::StochasticObjective< Real >::vsampler_
private

◆ gsampler_

template<class Real>
Ptr<SampleGenerator<Real> > ROL::StochasticObjective< Real >::gsampler_
private

◆ hsampler_

template<class Real>
Ptr<SampleGenerator<Real> > ROL::StochasticObjective< Real >::hsampler_
private

◆ comp_

template<class Real>
const int ROL::StochasticObjective< Real >::comp_
private

◆ index_

template<class Real>
int ROL::StochasticObjective< Real >::index_
private

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