ROL
ROL_RandVarFunctional.hpp File Reference
#include "ROL_Vector.hpp"
#include "ROL_Objective.hpp"
#include "ROL_Ptr.hpp"
#include "ROL_SampleGenerator.hpp"
#include "ROL_ScalarController.hpp"
#include "ROL_VectorController.hpp"

Go to the source code of this file.

Functions

virtual void resetStorage (bool flag=true)
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.

Function Documentation

◆ resetStorage() [1/2]

virtual void resetStorage ( bool flag = true)
virtual

Definition at line 192 of file ROL_RandVarFunctional.hpp.

◆ resetStorage() [2/2]

virtual void resetStorage ( UpdateType type)
virtual

Definition at line 204 of file ROL_RandVarFunctional.hpp.

◆ initialize()

virtual void initialize ( const Vector< Real > & x)
virtual

Initialize temporary variables.

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

Definition at line 219 of file ROL_RandVarFunctional.hpp.

References zero.

Referenced by ROL::CompositeObjective< Real >::computeValue(), ROL::TypeB::ColemanLiAlgorithm< Real >::run(), ROL::TypeB::GradientAlgorithm< Real >::run(), ROL::TypeB::InteriorPointAlgorithm< Real >::run(), ROL::TypeB::KelleySachsAlgorithm< Real >::run(), ROL::TypeB::LinMoreAlgorithm< Real >::run(), ROL::TypeB::LSecantBAlgorithm< Real >::run(), ROL::TypeB::MoreauYosidaAlgorithm< Real >::run(), ROL::TypeB::NewtonKrylovAlgorithm< Real >::run(), ROL::TypeB::PrimalDualActiveSetAlgorithm< Real >::run(), ROL::TypeB::QuasiNewtonAlgorithm< Real >::run(), ROL::TypeB::SpectralGradientAlgorithm< Real >::run(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::run(), ROL::TypeE::AugmentedLagrangianAlgorithm< Real >::run(), ROL::TypeE::FletcherAlgorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeG::AugmentedLagrangianAlgorithm< Real >::run(), ROL::TypeG::InteriorPointAlgorithm< Real >::run(), ROL::TypeG::MoreauYosidaAlgorithm< Real >::run(), ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeP::InexactNewtonAlgorithm< Real >::run(), ROL::TypeP::iPianoAlgorithm< Real >::run(), ROL::TypeP::ProxGradientAlgorithm< Real >::run(), ROL::TypeP::QuasiNewtonAlgorithm< Real >::run(), ROL::TypeP::SpectralGradientAlgorithm< Real >::run(), ROL::TypeP::TrustRegionAlgorithm< Real >::run(), ROL::TypeU::BundleAlgorithm< Real >::run(), and ROL::TypeU::LineSearchAlgorithm< Real >::run().

◆ setSample()

virtual void setSample ( const std::vector< Real > & point,
const Real weight )
virtual

Definition at line 237 of file ROL_RandVarFunctional.hpp.

◆ computeStatistic()

virtual Real computeStatistic ( const Ptr< const std::vector< Real > > & xstat) const
virtual

Compute statistic.

Parameters
[in]xstatis a ROL::Ptr to a std::vector containing the statistic vector

Definition at line 247 of file ROL_RandVarFunctional.hpp.

Referenced by ROL::OptimizationProblem< Real >::getSolutionStatistic(), and ROL::StochasticProblem< Real >::getSolutionStatistic().

◆ updateValue()

virtual void updateValue ( Objective< Real > & obj,
const Vector< Real > & x,
const std::vector< Real > & xstat,
Real & tol )
virtual

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

Definition at line 262 of file ROL_RandVarFunctional.hpp.

◆ updateGradient()

virtual void updateGradient ( Objective< Real > & obj,
const Vector< Real > & x,
const std::vector< Real > & xstat,
Real & tol )
virtual

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

Definition at line 279 of file ROL_RandVarFunctional.hpp.

◆ updateHessVec()

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 )
virtual

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

Definition at line 302 of file ROL_RandVarFunctional.hpp.

◆ getValue()

virtual Real getValue ( const Vector< Real > & x,
const std::vector< Real > & xstat,
SampleGenerator< Real > & sampler )
virtual

Return risk measure value.

Parameters
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getValue returns \(\mathcal{R}(f(x_0))\) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\).

Definition at line 320 of file ROL_RandVarFunctional.hpp.

Referenced by ROL::ConstraintFromObjective< Real >::applyAdjointHessian(), ROL::ConstraintFromObjective< Real >::applyAdjointJacobian(), and ROL::ConstraintFromObjective< Real >::getValue().

◆ getGradient()

virtual void getGradient ( Vector< Real > & g,
std::vector< Real > & gstat,
const Vector< Real > & x,
const std::vector< Real > & xstat,
SampleGenerator< Real > & sampler )
virtual

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\).

Definition at line 339 of file ROL_RandVarFunctional.hpp.

◆ getHessVec()

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 )
virtual

Return risk measure Hessian-times-a-vector.

Parameters
[out]hvis the Hessian-times-a-vector of the risk measure
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getHessVec returns \(\nabla^2 \mathcal{R}(f(x_0))v_0\) (if available) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\).

Definition at line 358 of file ROL_RandVarFunctional.hpp.