10 #ifndef ROL_ERRORMEASUREFACTORY_HPP
11 #define ROL_ERRORMEASUREFACTORY_HPP
13 #include "ROL_ParameterList.hpp"
43 std::string retString;
46 retString =
"Least Squares";
break;
48 retString =
"Huber";
break;
50 retString =
"Koenker-Bassett";
break;
52 retString =
"Moreau-Yosida-Koenker-Bassett";
break;
54 retString =
"Generalized Moreau-Yosida-Koenker-Bassett";
break;
56 retString =
"Exponential";
break;
58 retString =
"Log Quantile";
break;
60 retString =
"Smoothed Worst Case";
break;
62 retString =
"Last Type (Dummy)";
break;
64 retString =
"INVALID EErrorMeasure";
break;
112 std::string error = parlist.sublist(
"SOL").sublist(
"Error Measure").get(
"Name",
"Least Squares");
116 return makePtr<ExpectationQuadError<Real>>(makePtr<MeanVarianceQuadrangle<Real>>(parlist));
118 return makePtr<ExpectationQuadError<Real>>(makePtr<TruncatedMeanQuadrangle<Real>>(parlist));
120 return makePtr<ExpectationQuadError<Real>>(makePtr<QuantileQuadrangle<Real>>(parlist));
122 return makePtr<ExpectationQuadError<Real>>(makePtr<MoreauYosidaCVaR<Real>>(parlist));
124 return makePtr<ExpectationQuadError<Real>>(makePtr<GenMoreauYosidaCVaR<Real>>(parlist));
126 return makePtr<ExpectationQuadError<Real>>(makePtr<LogExponentialQuadrangle<Real>>(parlist));
128 return makePtr<ExpectationQuadError<Real>>(makePtr<LogQuantileQuadrangle<Real>>(parlist));
130 return makePtr<ExpectationQuadError<Real>>(makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist));
132 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
133 "Invalid error measure type " << error <<
"!");
std::string EErrorMeasureToString(EErrorMeasure ed)
EPolyProjAlgo & operator++(EPolyProjAlgo &type)
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
Ptr< RandVarFunctional< Real > > ErrorMeasureFactory(ParameterList &parlist)
EPolyProjAlgo & operator--(EPolyProjAlgo &type)
int isValidErrorMeasure(EErrorMeasure ed)
EErrorMeasure StringToEErrorMeasure(std::string s)