44 #ifndef ROL_PD_CVAR_HPP
45 #define ROL_PD_CVAR_HPP
83 values_ = makePtr<SampledScalar<Real>>();
84 gradvecs_ = makePtr<SampledScalar<Real>>();
86 hessvecs_ = makePtr<SampledVector<Real>>();
99 ROL_TEST_FOR_EXCEPTION((
alpha_ <=
zero) || (
alpha_ > one), std::invalid_argument,
100 ">>> ERROR (ROL::PD_CVaR): Convex combination parameter alpha is out of range!");
101 ROL_TEST_FOR_EXCEPTION((
beta_ <
zero) || (
beta_ >= one), std::invalid_argument,
102 ">>> ERROR (ROL::PD_CVaR): Confidence parameter beta is out of range!");
133 const std::vector<Real> &xstat,
139 Real arg = val - xstat[0];
146 const std::vector<Real> &xstat,
150 return ev +
alpha_ * xstat[0];
155 const std::vector<Real> &xstat,
157 const Real
zero(0), one(1);
161 Real arg = val - xstat[0];
165 if ( std::abs(c) >
zero ) {
172 std::vector<Real> &gstat,
174 const std::vector<Real> &xstat,
187 const std::vector<Real> &vstat,
189 const std::vector<Real> &xstat,
191 const Real
zero(0), one(1);
195 Real arg = val - xstat[0];
199 if ( std::abs(pf2) >
zero ) {
206 if ( std::abs(c) >
zero ) {
213 std::vector<Real> &hvstat,
215 const std::vector<Real> &vstat,
217 const std::vector<Real> &xstat,
virtual void setHessVecStorage(const Ptr< SampledScalar< Real >> &gradvec_storage, const Ptr< SampledVector< Real >> &hessvec_storage)
Provides the interface to evaluate objective functions.
void computeHessVec(Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
Ptr< Vector< Real > > hv_
PD_CVaR(const Real alpha, const Real beta)
Real ppf(const Real x, const Real t, const Real r, const int deriv=0) const
Contains definitions of custom data types in ROL.
void initializeStorage(void)
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
Real getPenaltyParameter(void) const
std::vector< Real > point_
Ptr< Vector< Real > > dualVector_
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Ptr< SampledVector< Real > > gradients_
virtual void setStorage(const Ptr< SampledScalar< Real >> &value_storage, const Ptr< SampledVector< Real >> &gradient_storage)
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.
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
Ptr< SampledScalar< Real > > values_
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 void setStorage(const Ptr< SampledScalar< Real >> &value_storage, const Ptr< SampledVector< Real >> &gradient_storage)
void getMultiplier(Real &lam, const std::vector< Real > &pt) const
void computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
void setStorage(const Ptr< SampledScalar< Real >> &value_storage, const Ptr< SampledVector< Real >> &gradient_storage)
void initialize(const Vector< Real > &x)
Initialize temporary variables.
virtual void initialize(const Vector< Real > &x)
Initialize temporary variables.
Real computeGradVec(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Provides the interface to implement any functional that maps a random variable to a (extended) real n...
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.
void setValue(const Real val, const std::vector< Real > &pt)
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 setHessVecStorage(const Ptr< SampledScalar< Real >> &gradvec_storage, const Ptr< SampledVector< Real >> &hessvec_storage)
virtual void setHessVecStorage(const Ptr< SampledScalar< Real >> &gradvec_storage, const Ptr< SampledVector< Real >> &hessvec_storage)
Ptr< SampledVector< Real > > hessvecs_
Ptr< SampledScalar< Real > > gradvecs_