44 #ifndef ROL_SUPERQUANTILEQUADRANGLE_HPP
45 #define ROL_SUPERQUANTILEQUADRANGLE_HPP
48 #include "ROL_GaussLegendreQuadrature.hpp"
49 #include "ROL_Fejer2Quadrature.hpp"
97 ROL_TEST_FOR_EXCEPTION((alpha_ < 0 || alpha_ >= 1), std::invalid_argument,
98 ">>> ERROR (ROL::SecondOrderCVaR): Confidence level not between 0 and 1!");
99 ROL_TEST_FOR_EXCEPTION(
plusFunction_ == ROL::nullPtr, std::invalid_argument,
100 ">>> ERROR (ROL::SecondOrderCVaR): PlusFunction pointer is null!");
104 ROL::Ptr<Quadrature1D<Real> > quad;
106 quad = ROL::makePtr<GaussLegendreQuadrature<Real>>(
nQuad_);
109 quad = ROL::makePtr<Fejer2Quadrature<Real>>(
nQuad_);
113 Real sum(0), half(0.5), one(1);
114 for (
int i = 0; i <
nQuad_; ++i) {
117 for (
int i = 0; i <
nQuad_; ++i) {
128 ROL::ParameterList &list
129 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Second Order CVaR");
131 alpha_ = list.get<Real>(
"Confidence Level");
132 nQuad_ = list.get(
"Number of Quadrature Points",5);
133 useGauss_ = list.get(
"Use Gauss-Legendre Quadrature",
true);
143 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.