66 ROL_TEST_FOR_EXCEPTION((
prob_ <=
zero) || (
prob_ >= one), std::invalid_argument,
67 ">>> ERROR (ROL::CVaR): Confidence level must be between 0 and 1!");
68 ROL_TEST_FOR_EXCEPTION((
coeff_ <
zero) || (
coeff_ > one), std::invalid_argument,
69 ">>> ERROR (ROL::CVaR): Convex combination parameter must be positive!");
70 ROL_TEST_FOR_EXCEPTION(
plusFunction_ == nullPtr, std::invalid_argument,
71 ">>> ERROR (ROL::CVaR): PlusFunction pointer is null!");
84 CVaR(
const Real prob,
const Real coeff,
100 CVaR( ROL::ParameterList &parlist )
102 ROL::ParameterList &list
103 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"CVaR");
105 prob_ = list.get<Real>(
"Confidence Level");
106 coeff_ = list.get<Real>(
"Convex Combination Parameter");
115 const std::vector<Real> &xstat,
125 const std::vector<Real> &xstat,
132 if (std::abs(c) >= ROL_EPSILON<Real>()) {
140 const std::vector<Real> &vstat,
142 const std::vector<Real> &xstat,
149 if (std::abs(pf2) >= ROL_EPSILON<Real>()) {
156 if (std::abs(c) >= ROL_EPSILON<Real>()) {
163 const std::vector<Real> &xstat,
172 std::vector<Real> &gstat,
174 const std::vector<Real> &xstat,
185 std::vector<Real> &hvstat,
187 const std::vector<Real> &vstat,
189 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)
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
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 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.
CVaR(ROL::ParameterList &parlist)
Constructor.
Ptr< PlusFunction< Real > > plusFunction_
Ptr< Vector< Real > > hv_
Provides an interface for a convex combination of the expected value and the conditional value-at-ris...
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
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()
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
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 checkInputs(void) const
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)
Provides the interface to implement any functional that maps a random variable to a (extended) real n...
CVaR(const Real prob, const Real coeff, const Ptr< PlusFunction< Real > > &pf)
Constructor.
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.