44 #ifndef ROL_LOGEXPONENTIALQUAD_HPP
45 #define ROL_LOGEXPONENTIALQUAD_HPP
86 std::string type = parlist.sublist(
"SOL").get(
"Stochastic Component Type",
"Risk Averse");
87 ROL::ParameterList list;
88 if (type ==
"Risk Averse") {
89 list = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Entropic Risk");
91 else if (type ==
"Error") {
92 list = parlist.sublist(
"SOL").sublist(
"Error Measure").sublist(
"Exponential");
94 else if (type ==
"Deviation") {
95 list = parlist.sublist(
"SOL").sublist(
"Deviation Measure").sublist(
"Entropic");
97 else if (type ==
"Regret") {
98 list = parlist.sublist(
"SOL").sublist(
"Regret Measure").sublist(
"Exponential");
100 coeff_ = list.get<Real>(
"Rate");
105 ROL_TEST_FOR_EXCEPTION((
coeff_ <= zero), std::invalid_argument,
106 ">>> ERROR (ROL::LogExponentialQuadrangle): Rate must be positive!");
134 Real err(0), one(1), cx =
coeff_*x;
136 err = (std::exp(cx) - cx - one)/
coeff_;
139 err = std::exp(cx) - one;
142 err =
coeff_*std::exp(cx);
148 Real
zero(0), one(1);
149 Real X = ((deriv==0) ? x : ((deriv==1) ? one :
zero));
150 Real reg =
error(x,deriv) + X;
LogExponentialQuadrangle(const Real coeff=1)
Constructor.
LogExponentialQuadrangle(ROL::ParameterList &parlist)
Constructor.
Provides a general interface for risk and error measures generated through the expectation risk quadr...
Provides an interface for the entropic risk using the expectation risk quadrangle.
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Real error(Real x, int deriv=0)
Evaluate the scalar error function at x.
void parseParameterList(ROL::ParameterList &parlist)
Real regret(Real x, int deriv=0)
Evaluate the scalar regret function at x.
void checkInputs(void) const