100 ROL_TEST_FOR_EXCEPTION((
prob_ <=
zero) || (
prob_ >= one), std::invalid_argument,
101 ">>> ERROR (ROL::CVaR): Confidence level must be between 0 and 1!");
102 ROL_TEST_FOR_EXCEPTION((
coeff_ <
zero) || (
coeff_ > one), std::invalid_argument,
103 ">>> ERROR (ROL::CVaR): Convex combination parameter must be positive!");
104 ROL_TEST_FOR_EXCEPTION(
plusFunction_ == nullPtr, std::invalid_argument,
105 ">>> ERROR (ROL::CVaR): PlusFunction pointer is null!");
118 CVaR(
const Real prob,
const Real coeff,
134 CVaR( ROL::ParameterList &parlist )
136 ROL::ParameterList &list
137 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"CVaR");
139 prob_ = list.get<Real>(
"Confidence Level");
140 coeff_ = list.get<Real>(
"Convex Combination Parameter");
149 const std::vector<Real> &xstat,
159 const std::vector<Real> &xstat,
166 if (std::abs(c) >= ROL_EPSILON<Real>()) {
174 const std::vector<Real> &vstat,
176 const std::vector<Real> &xstat,
183 if (std::abs(pf2) >= ROL_EPSILON<Real>()) {
190 if (std::abs(c) >= ROL_EPSILON<Real>()) {
197 const std::vector<Real> &xstat,
206 std::vector<Real> &gstat,
208 const std::vector<Real> &xstat,
219 std::vector<Real> &hvstat,
221 const std::vector<Real> &vstat,
223 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.