57 BPOE(
const Real threshold,
const Real order=1)
63 ROL::ParameterList &list = parlist.sublist(
"SOL").sublist(
"Probability").sublist(
"bPOE");
65 order_ = list.get<Real>(
"Moment Order");
83 const std::vector<Real> &xstat,
85 const Real
zero(0), one(1);
94 const std::vector<Real> &xstat,
99 return ((
order_==one) ? bpoe : std::pow(bpoe,one/
order_));
104 const std::vector<Real> &xstat,
106 const Real
zero(0), one(1), two(2);
111 Real pvalp0 = ((
order_==one) ? bp : std::pow(bp,
order_));
120 std::vector<Real> &gstat,
122 const std::vector<Real> &xstat,
124 const Real
zero(0), one(1);
125 std::vector<Real> myvals(2), gvals(2);
126 myvals[0] =
val_; myvals[1] =
gv_;
127 sampler.
sumAll(&myvals[0],&gvals[0],2);
128 if ( gvals[0] >
zero) {
131 g.
scale(xstat[0]/norm);
132 gstat[0] = gvals[1]/norm;
142 const std::vector<Real> &vstat,
144 const std::vector<Real> &xstat,
146 const Real
zero(0), one(1), two(2), three(3);
152 Real pvalp0 = ((
order_==one) ? bp : std::pow(bp,
order_));
153 Real pvalp1 = ((
order_==one) ? one
161 hvec_[3] +=
weight_ * pvalp1 * gv;
173 std::vector<Real> &hvstat,
175 const std::vector<Real> &vstat,
177 const std::vector<Real> &xstat,
179 const Real
zero(0), one(1), two(2);
180 std::vector<Real> gvals(5);
183 if ( gvals[0] >
zero ) {
184 Real norm0 = ((
order_==one) ? one
185 : ((
order_==two) ? std::sqrt(gvals[0])
187 Real norm1 = ((
order_==one) ? gvals[0]
189 hvstat[0] = (
order_-one)*((gvals[2]/norm0 - gvals[1]*gvals[1]/norm1)*vstat[0]
190 +xstat[0]*(gvals[4]/norm0 - gvals[3]*gvals[1]/norm1))
194 hv.
scale(xstat[0]/norm0);
197 Real coeff = -(
order_-one)*xstat[0]*(xstat[0]*gvals[3]+vstat[0]*gvals[1])/norm1+vstat[0]/norm0;
Provides the interface to evaluate objective functions.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
void computeHessVec(Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
virtual void scale(const Real alpha)=0
Compute where .
ROL::Ptr< Vector< Real > > dualVec2_
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Ptr< Vector< Real > > hv_
Provides the implementation of the buffered probability of exceedance.
BPOE(const Real threshold, const Real order=1)
std::vector< Real > hvec_
Ptr< Vector< Real > > dualVector_
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
void initialize(const Vector< Real > &x)
Initialize temporary variables.
void sumAll(Real *input, Real *output, int dim) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
void getGradient(Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure (sub)gradient.
ROL::Ptr< Vector< Real > > dualVec1_
void getHessVec(Vector< Real > &hv, std::vector< Real > &hvstat, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure Hessian-times-a-vector.
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
void computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
Real computeGradVec(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Provides the interface to implement any functional that maps a random variable to a (extended) real n...
void updateHessVec(Objective< Real > &obj, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for Hessian-time-a-vector computation.
BPOE(ROL::ParameterList &parlist)
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
virtual void initialize(const Vector< Real > &x)
Initialize temporary variables.