10 #ifndef ROL_SUPERQUANTILEQUADRANGLE_HPP
11 #define ROL_SUPERQUANTILEQUADRANGLE_HPP
14 #include "ROL_GaussLegendreQuadrature.hpp"
15 #include "ROL_Fejer2Quadrature.hpp"
63 ROL_TEST_FOR_EXCEPTION((alpha_ < 0 || alpha_ >= 1), std::invalid_argument,
64 ">>> ERROR (ROL::SecondOrderCVaR): Confidence level not between 0 and 1!");
65 ROL_TEST_FOR_EXCEPTION(
plusFunction_ == ROL::nullPtr, std::invalid_argument,
66 ">>> ERROR (ROL::SecondOrderCVaR): PlusFunction pointer is null!");
70 ROL::Ptr<Quadrature1D<Real> > quad;
72 quad = ROL::makePtr<GaussLegendreQuadrature<Real>>(
nQuad_);
75 quad = ROL::makePtr<Fejer2Quadrature<Real>>(
nQuad_);
79 Real sum(0), half(0.5), one(1);
80 for (
int i = 0; i <
nQuad_; ++i) {
83 for (
int i = 0; i <
nQuad_; ++i) {
94 ROL::ParameterList &list
95 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Second Order CVaR");
97 alpha_ = list.get<Real>(
"Confidence Level");
98 nQuad_ = list.get(
"Number of Quadrature Points",5);
99 useGauss_ = list.get(
"Use Gauss-Legendre Quadrature",
true);
109 const bool useGauss =
true)
void initializeQuad(void)
void buildMixedQuantile(const std::vector< Real > &pts, const std::vector< Real > &wts, const ROL::Ptr< PlusFunction< Real > > &pf)
SecondOrderCVaR(ROL::ParameterList &parlist)
SecondOrderCVaR(const Real alpha, const int nQuad, const ROL::Ptr< PlusFunction< Real > > &pf, const bool useGauss=true)
Provides an interface for spectral risk measures.
void checkInputs(void) const
ROL::Ptr< PlusFunction< Real > > plusFunction_
Provides an interface for the risk measure associated with the super quantile quadrangle.