10 #ifndef ROL_DEVIATIONMEASUREFACTORY_HPP
11 #define ROL_DEVIATIONMEASUREFACTORY_HPP
13 #include "ROL_ParameterList.hpp"
43 std::string retString;
46 retString =
"Variance";
break;
48 retString =
"Truncated Mean";
break;
50 retString =
"CVaR";
break;
52 retString =
"Moreau-Yosida CVaR";
break;
54 retString =
"Generalized Moreau-Yosida CVaR";
break;
56 retString =
"Entropic";
break;
58 retString =
"Log Quantile";
break;
60 retString =
"Smoothed Upper Range";
break;
62 retString =
"Last Type (Dummy)";
break;
64 retString =
"INVALID EDeviationMeasure";
break;
112 std::string deviation = parlist.sublist(
"SOL").sublist(
"Deviation Measure").get(
"Name",
"Variance");
116 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
118 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
120 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
122 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
124 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
126 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
128 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
130 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
132 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
133 "Invalid deviation measure type " << deviation <<
"!");
EPolyProjAlgo & operator++(EPolyProjAlgo &type)
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
EPolyProjAlgo & operator--(EPolyProjAlgo &type)
std::string EDeviationMeasureToString(EDeviationMeasure ed)
int isValidDeviationMeasure(EDeviationMeasure ed)
Ptr< RandVarFunctional< Real > > DeviationMeasureFactory(ParameterList &parlist)
EDeviationMeasure StringToEDeviationMeasure(std::string s)