44 #ifndef ROL_ERRORMEASUREFACTORY_HPP
45 #define ROL_ERRORMEASUREFACTORY_HPP
47 #include "ROL_ParameterList.hpp"
77 std::string retString;
80 retString =
"Least Squares";
break;
82 retString =
"Huber";
break;
84 retString =
"Koenker-Bassett";
break;
86 retString =
"Moreau-Yosida-Koenker-Bassett";
break;
88 retString =
"Generalized Moreau-Yosida-Koenker-Bassett";
break;
90 retString =
"Exponential";
break;
92 retString =
"Log Quantile";
break;
94 retString =
"Smoothed Worst Case";
break;
96 retString =
"Last Type (Dummy)";
break;
98 retString =
"INVALID EErrorMeasure";
break;
146 std::string risk = parlist.sublist(
"SOL").sublist(
"Error Measure").get(
"Name",
"Least Squares");
150 return makePtr<ExpectationQuadError<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
152 return makePtr<ExpectationQuadError<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
154 return makePtr<ExpectationQuadError<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
156 return makePtr<ExpectationQuadError<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
158 return makePtr<ExpectationQuadError<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
160 return makePtr<ExpectationQuadError<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
162 return makePtr<ExpectationQuadError<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
164 return makePtr<ExpectationQuadError<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
166 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
167 "Invalid error measure type " << risk <<
"!");
std::string EErrorMeasureToString(EErrorMeasure ed)
EKrylov & operator++(EKrylov &type)
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
Ptr< RandVarFunctional< Real > > ErrorMeasureFactory(ROL::ParameterList &parlist)
int isValidErrorMeasure(EErrorMeasure ed)
EErrorMeasure StringToEErrorMeasure(std::string s)
EKrylov & operator--(EKrylov &type)