44 #ifndef ROL_REGRETMEASUREFACTORY_HPP
45 #define ROL_REGRETMEASUREFACTORY_HPP
47 #include "ROL_ParameterList.hpp"
74 std::string retString;
77 retString =
"Mean Absolute Loss";
break;
79 retString =
"Moreau-Yosida Mean Absolute Loss";
break;
81 retString =
"Generalized Moreau-Yosida Mean Absolute Loss";
break;
83 retString =
"Exponential";
break;
85 retString =
"Mean L2";
break;
87 retString =
"Truncated Mean";
break;
89 retString =
"Log Quantile";
break;
91 retString =
"Smoothed Worst Case";
break;
93 retString =
"Last Type (Dummy)";
break;
95 retString =
"INVALID ERegretMeasure";
break;
143 std::string regret = parlist.sublist(
"SOL").sublist(
"Regret Measure").get(
"Name",
"Mean Absolute Loss");
147 return makePtr<ExpectationQuadRegret<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
149 return makePtr<ExpectationQuadRegret<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
151 return makePtr<ExpectationQuadRegret<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
153 return makePtr<ExpectationQuadRegret<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
155 return makePtr<ExpectationQuadRegret<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
157 return makePtr<ExpectationQuadRegret<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
159 return makePtr<ExpectationQuadRegret<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
161 return makePtr<ExpectationQuadRegret<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
163 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
164 "Invalid regret measure type " << regret <<
"!");
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
int isValidRegretMeasure(ERegretMeasure ed)
std::string ERegretMeasureToString(ERegretMeasure ed)
Ptr< RandVarFunctional< Real > > RegretMeasureFactory(ROL::ParameterList &parlist)
ERegretMeasure StringToERegretMeasure(std::string s)
ETrustRegion & operator--(ETrustRegion &type)
ETrustRegion & operator++(ETrustRegion &type)