10 #ifndef ROL_PD_CVAR_HPP
11 #define ROL_PD_CVAR_HPP
49 values_ = makePtr<ScalarController<Real>>();
50 gradvecs_ = makePtr<ScalarController<Real>>();
51 gradients_ = makePtr<VectorController<Real>>();
52 hessvecs_ = makePtr<VectorController<Real>>();
65 ROL_TEST_FOR_EXCEPTION((
alpha_ <=
zero) || (
alpha_ > one), std::invalid_argument,
66 ">>> ERROR (ROL::PD_CVaR): Convex combination parameter alpha is out of range!");
67 ROL_TEST_FOR_EXCEPTION((
beta_ <
zero) || (
beta_ >= one), std::invalid_argument,
68 ">>> ERROR (ROL::PD_CVaR): Confidence parameter beta is out of range!");
73 PD_CVaR(
const Real alpha,
const Real beta)
99 const std::vector<Real> &xstat,
105 Real arg = val - xstat[0];
112 const std::vector<Real> &xstat,
116 return ev +
alpha_ * xstat[0];
121 const std::vector<Real> &xstat,
123 const Real
zero(0), one(1);
127 Real arg = val - xstat[0];
131 if ( std::abs(c) >
zero ) {
138 std::vector<Real> &gstat,
140 const std::vector<Real> &xstat,
153 const std::vector<Real> &vstat,
155 const std::vector<Real> &xstat,
157 const Real
zero(0), one(1);
161 Real arg = val - xstat[0];
165 if ( std::abs(pf2) >
zero ) {
172 if ( std::abs(c) >
zero ) {
179 std::vector<Real> &hvstat,
181 const std::vector<Real> &vstat,
183 const std::vector<Real> &xstat,
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)
Ptr< VectorController< Real > > gradients_
virtual void setHessVecStorage(const Ptr< ScalarController< Real >> &gradvec_storage, const Ptr< VectorController< Real >> &hessvec_storage)
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_
virtual void setStorage(const Ptr< ScalarController< Real >> &value_storage, const Ptr< VectorController< Real >> &gradient_storage)
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< ScalarController< Real > > values_
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.
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< ScalarController< Real >> &value_storage, const Ptr< VectorController< Real >> &gradient_storage)
void setStorage(const Ptr< ScalarController< Real >> &value_storage, const Ptr< VectorController< Real >> &gradient_storage)
void getMultiplier(Real &lam, const std::vector< Real > &pt) const
void setHessVecStorage(const Ptr< ScalarController< Real >> &gradvec_storage, const Ptr< VectorController< Real >> &hessvec_storage)
void computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
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...
Ptr< ScalarController< Real > > gradvecs_
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.
virtual void setHessVecStorage(const Ptr< ScalarController< Real >> &gradvec_storage, const Ptr< VectorController< Real >> &hessvec_storage)
Ptr< VectorController< Real > > hessvecs_