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

#include <ROL_PD_MeanSemiDeviation.hpp>

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

Public Member Functions

 PD_MeanSemiDeviation (const Real coeff)
 
void setStorage (const Ptr< ScalarController< Real > > &value_storage, const Ptr< VectorController< Real > > &gradient_storage)
 
void setHessVecStorage (const Ptr< ScalarController< Real > > &gradvec_storage, const Ptr< VectorController< Real > > &hessvec_storage)
 
void initialize (const Vector< Real > &x)
 Initialize temporary variables.
 
void updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal storage for value computation.
 
Real getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure value.
 
void updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal risk measure storage for gradient computation.
 
void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure (sub)gradient.
 
void updateHessVec (Objective< Real > &obj, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal risk measure storage for Hessian-time-a-vector computation.
 
void getHessVec (Vector< Real > &hv, std::vector< Real > &hvstat, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure Hessian-times-a-vector.
 
- Public Member Functions inherited from ROL::PD_RandVarFunctional< Real >
 PD_RandVarFunctional (void)
 
void setData (SampleGenerator< Real > &sampler, const Real pen, const Real lam=0.0)
 
virtual Real computeDual (SampleGenerator< Real > &sampler)
 
void updateDual (SampleGenerator< Real > &sampler)
 
void updatePenalty (const Real pen)
 
virtual void setStorage (const Ptr< ScalarController< Real > > &value_storage, const Ptr< VectorController< Real > > &gradient_storage)
 
virtual void setHessVecStorage (const Ptr< ScalarController< Real > > &gradvec_storage, const Ptr< VectorController< Real > > &hessvec_storage)
 
virtual void initialize (const Vector< Real > &x)
 Initialize temporary variables.
 
- Public Member Functions inherited from ROL::RandVarFunctional< Real >
virtual ~RandVarFunctional ()
 
 RandVarFunctional (void)
 
void useStorage (bool storage)
 
void useHessVecStorage (bool storage)
 
virtual void setStorage (const Ptr< ScalarController< Real > > &value_storage, const Ptr< VectorController< Real > > &gradient_storage)
 
virtual void setHessVecStorage (const Ptr< ScalarController< Real > > &gradvec_storage, const Ptr< VectorController< Real > > &hessvec_storage)
 
virtual void resetStorage (bool flag=true)
 Reset internal storage.
 
virtual void resetStorage (UpdateType type)
 
virtual void initialize (const Vector< Real > &x)
 Initialize temporary variables.
 
virtual void setSample (const std::vector< Real > &point, const Real weight)
 
virtual Real computeStatistic (const Ptr< const std::vector< Real > > &xstat) const
 Compute statistic.
 
virtual void updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal storage for value computation.
 
virtual void updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal risk measure storage for gradient computation.
 
virtual void updateHessVec (Objective< Real > &obj, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal risk measure storage for Hessian-time-a-vector computation.
 
virtual Real getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure value.
 
virtual void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure (sub)gradient.
 
virtual void getHessVec (Vector< Real > &hv, std::vector< Real > &hvstat, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure Hessian-times-a-vector.
 

Private Member Functions

void initializeStorage (void)
 
void clear (void)
 
void checkInputs (void)
 

Private Attributes

Real coeff_
 
Ptr< ScalarController< Real > > values_
 
Ptr< ScalarController< Real > > gradvecs_
 
Ptr< VectorController< Real > > gradients_
 
Ptr< VectorController< Real > > hessvecs_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::PD_RandVarFunctional< Real >
void setValue (const Real val, const std::vector< Real > &pt)
 
void getMultiplier (Real &lam, const std::vector< Real > &pt) const
 
void setMultiplier (Real &lam, const std::vector< Real > &pt)
 
Real getPenaltyParameter (void) const
 
Real ppf (const Real x, const Real t, const Real r, const int deriv=0) const
 
- Protected Member Functions inherited from ROL::RandVarFunctional< Real >
Real computeValue (Objective< Real > &obj, const Vector< Real > &x, Real &tol)
 
void computeGradient (Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
 
Real computeGradVec (Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
void computeHessVec (Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
- Protected Attributes inherited from ROL::RandVarFunctional< Real >
Real val_
 
Real gv_
 
Ptr< Vector< Real > > g_
 
Ptr< Vector< Real > > hv_
 
Ptr< Vector< Real > > dualVector_
 
bool firstReset_
 
std::vector< Real > point_
 
Real weight_
 

Detailed Description

template<class Real>
class ROL::PD_MeanSemiDeviation< Real >

Definition at line 52 of file ROL_PD_MeanSemiDeviation.hpp.

Constructor & Destructor Documentation

◆ PD_MeanSemiDeviation()

template<class Real >
ROL::PD_MeanSemiDeviation< Real >::PD_MeanSemiDeviation ( const Real  coeff)
inline

Member Function Documentation

◆ initializeStorage()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::initializeStorage ( void  )
inlineprivate

◆ clear()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::clear ( void  )
inlineprivate

◆ checkInputs()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::checkInputs ( void  )
inlineprivate

◆ setStorage()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::setStorage ( const Ptr< ScalarController< Real > > &  value_storage,
const Ptr< VectorController< Real > > &  gradient_storage 
)
inlinevirtual

◆ setHessVecStorage()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::setHessVecStorage ( const Ptr< ScalarController< Real > > &  gradvec_storage,
const Ptr< VectorController< Real > > &  hessvec_storage 
)
inlinevirtual

◆ initialize()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::initialize ( const Vector< Real > &  x)
inlinevirtual

Initialize temporary variables.

   @param[in]   x  is a vector used for initializing storage

Reimplemented from ROL::PD_RandVarFunctional< Real >.

Definition at line 122 of file ROL_PD_MeanSemiDeviation.hpp.

References ROL::PD_MeanSemiDeviation< Real >::clear(), and ROL::PD_RandVarFunctional< Real >::initialize().

◆ updateValue()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::updateValue ( Objective< Real > &  obj,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
Real &  tol 
)
inlinevirtual

Update internal storage for value computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 127 of file ROL_PD_MeanSemiDeviation.hpp.

References ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.

◆ getValue()

template<class Real >
Real ROL::PD_MeanSemiDeviation< Real >::getValue ( const Vector< Real > &  x,
const std::vector< Real > &  xstat,
SampleGenerator< Real > &  sampler 
)
inlinevirtual

◆ updateGradient()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::updateGradient ( Objective< Real > &  obj,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
Real &  tol 
)
inlinevirtual

Update internal risk measure storage for gradient computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 157 of file ROL_PD_MeanSemiDeviation.hpp.

References ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.

◆ getGradient()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::getGradient ( Vector< Real > &  g,
std::vector< Real > &  gstat,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
SampleGenerator< Real > &  sampler 
)
inlinevirtual

Return risk measure (sub)gradient.

Parameters
[out]gis the (sub)gradient of the risk measure
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getGradient returns \(\theta\in\partial\mathcal{R}(f(x_0))\) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\) and \(\partial\mathcal{R}(X)\) denotes the subdifferential of \(\mathcal{R}\) at \(X\).

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 167 of file ROL_PD_MeanSemiDeviation.hpp.

References ROL::PD_MeanSemiDeviation< Real >::coeff_, ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::PD_RandVarFunctional< Real >::getMultiplier(), ROL::SampleGenerator< Real >::getMyPoint(), ROL::SampleGenerator< Real >::getMyWeight(), ROL::PD_RandVarFunctional< Real >::getPenaltyParameter(), ROL::PD_MeanSemiDeviation< Real >::gradients_, ROL::RandVarFunctional< Real >::hv_, ROL::SampleGenerator< Real >::numMySamples(), ROL::PD_RandVarFunctional< Real >::ppf(), ROL::SampleGenerator< Real >::start(), ROL::SampleGenerator< Real >::sumAll(), ROL::RandVarFunctional< Real >::val_, and ROL::PD_MeanSemiDeviation< Real >::values_.

◆ updateHessVec()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::updateHessVec ( Objective< Real > &  obj,
const Vector< Real > &  v,
const std::vector< Real > &  vstat,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
Real &  tol 
)
inlinevirtual

Update internal risk measure storage for Hessian-time-a-vector computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]gvis the gradient of the random variable objective function at the current sample point applied to the vector v0
[in]hvis the Hessian of the random variable objective function at the current sample point applied to the vector v0
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 194 of file ROL_PD_MeanSemiDeviation.hpp.

References ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::gv_, ROL::RandVarFunctional< Real >::hv_, ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.

◆ getHessVec()

template<class Real >
void ROL::PD_MeanSemiDeviation< Real >::getHessVec ( Vector< Real > &  hv,
std::vector< Real > &  hvstat,
const Vector< Real > &  v,
const std::vector< Real > &  vstat,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
SampleGenerator< Real > &  sampler 
)
inlinevirtual

Member Data Documentation

◆ coeff_

template<class Real >
Real ROL::PD_MeanSemiDeviation< Real >::coeff_
private

◆ values_

template<class Real >
Ptr<ScalarController<Real> > ROL::PD_MeanSemiDeviation< Real >::values_
private

◆ gradvecs_

template<class Real >
Ptr<ScalarController<Real> > ROL::PD_MeanSemiDeviation< Real >::gradvecs_
private

◆ gradients_

template<class Real >
Ptr<VectorController<Real> > ROL::PD_MeanSemiDeviation< Real >::gradients_
private

◆ hessvecs_

template<class Real >
Ptr<VectorController<Real> > ROL::PD_MeanSemiDeviation< Real >::hessvecs_
private

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