44 #ifndef ROL_DEVIATIONMEASUREFACTORY_HPP
45 #define ROL_DEVIATIONMEASUREFACTORY_HPP
47 #include "ROL_ParameterList.hpp"
77 std::string retString;
80 retString =
"Variance";
break;
82 retString =
"Truncated Mean";
break;
84 retString =
"CVaR";
break;
86 retString =
"Moreau-Yosida CVaR";
break;
88 retString =
"Generalized Moreau-Yosida CVaR";
break;
90 retString =
"Entropic";
break;
92 retString =
"Log Quantile";
break;
94 retString =
"Smoothed Upper Range";
break;
96 retString =
"Last Type (Dummy)";
break;
98 retString =
"INVALID EDeviationMeasure";
break;
146 std::string risk = parlist.sublist(
"SOL").sublist(
"Deviation Measure").get(
"Name",
"Variance");
150 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
152 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
154 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
156 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
158 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
160 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
162 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
164 return makePtr<ExpectationQuadDeviation<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
166 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
167 "Invalid deviation measure type " << risk <<
"!");
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
std::string EDeviationMeasureToString(EDeviationMeasure ed)
ETrustRegion & operator--(ETrustRegion &type)
Ptr< RandVarFunctional< Real > > DeviationMeasureFactory(ROL::ParameterList &parlist)
int isValidDeviationMeasure(EDeviationMeasure ed)
ETrustRegion & operator++(ETrustRegion &type)
EDeviationMeasure StringToEDeviationMeasure(std::string s)