10 #ifndef ROL_REGRETMEASUREFACTORY_HPP
11 #define ROL_REGRETMEASUREFACTORY_HPP
13 #include "ROL_ParameterList.hpp"
40 std::string retString;
43 retString =
"Mean Absolute Loss";
break;
45 retString =
"Moreau-Yosida Mean Absolute Loss";
break;
47 retString =
"Generalized Moreau-Yosida Mean Absolute Loss";
break;
49 retString =
"Exponential";
break;
51 retString =
"Mean L2";
break;
53 retString =
"Truncated Mean";
break;
55 retString =
"Log Quantile";
break;
57 retString =
"Smoothed Worst Case";
break;
59 retString =
"Last Type (Dummy)";
break;
61 retString =
"INVALID ERegretMeasure";
break;
109 std::string regret = parlist.sublist(
"SOL").sublist(
"Regret Measure").get(
"Name",
"Mean Absolute Loss");
113 return makePtr<ExpectationQuadRegret<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
115 return makePtr<ExpectationQuadRegret<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
117 return makePtr<ExpectationQuadRegret<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
119 return makePtr<ExpectationQuadRegret<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
121 return makePtr<ExpectationQuadRegret<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
123 return makePtr<ExpectationQuadRegret<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
125 return makePtr<ExpectationQuadRegret<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
127 return makePtr<ExpectationQuadRegret<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
129 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
130 "Invalid regret measure type " << regret <<
"!");
EPolyProjAlgo & operator++(EPolyProjAlgo &type)
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
Ptr< RandVarFunctional< Real > > RegretMeasureFactory(ParameterList &parlist)
int isValidRegretMeasure(ERegretMeasure ed)
EPolyProjAlgo & operator--(EPolyProjAlgo &type)
std::string ERegretMeasureToString(ERegretMeasure ed)
ERegretMeasure StringToERegretMeasure(std::string s)