10 #ifndef ROL_LOGEXPONENTIALQUAD_HPP
11 #define ROL_LOGEXPONENTIALQUAD_HPP
52 std::string type = parlist.sublist(
"SOL").get(
"Type",
"Risk Averse");
53 ROL::ParameterList list;
54 if (type ==
"Risk Averse") {
55 list = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Entropic Risk");
57 else if (type ==
"Error") {
58 list = parlist.sublist(
"SOL").sublist(
"Error Measure").sublist(
"Exponential");
60 else if (type ==
"Deviation") {
61 list = parlist.sublist(
"SOL").sublist(
"Deviation Measure").sublist(
"Entropic");
63 else if (type ==
"Regret") {
64 list = parlist.sublist(
"SOL").sublist(
"Regret Measure").sublist(
"Exponential");
66 coeff_ = list.get<Real>(
"Rate");
71 ROL_TEST_FOR_EXCEPTION((
coeff_ <= zero), std::invalid_argument,
72 ">>> ERROR (ROL::LogExponentialQuadrangle): Rate must be positive!");
99 Real
error(Real x,
int deriv = 0) {
100 Real err(0), one(1), cx =
coeff_*x;
102 err = (std::exp(cx) - cx - one)/
coeff_;
105 err = std::exp(cx) - one;
108 err =
coeff_*std::exp(cx);
114 Real
zero(0), one(1);
115 Real X = ((deriv==0) ? x : ((deriv==1) ? one :
zero));
116 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