91 BPOE(
const Real threshold,
const Real order=1)
97 ROL::ParameterList &list = parlist.sublist(
"SOL").sublist(
"Probability").sublist(
"bPOE");
99 order_ = list.get<Real>(
"Moment Order");
117 const std::vector<Real> &xstat,
119 const Real
zero(0), one(1);
128 const std::vector<Real> &xstat,
133 return ((
order_==one) ? bpoe : std::pow(bpoe,one/
order_));
138 const std::vector<Real> &xstat,
140 const Real
zero(0), one(1), two(2);
145 Real pvalp0 = ((
order_==one) ? bp : std::pow(bp,
order_));
154 std::vector<Real> &gstat,
156 const std::vector<Real> &xstat,
158 const Real
zero(0), one(1);
159 std::vector<Real> myvals(2), gvals(2);
160 myvals[0] =
val_; myvals[1] =
gv_;
161 sampler.
sumAll(&myvals[0],&gvals[0],2);
162 if ( gvals[0] >
zero) {
165 g.
scale(xstat[0]/norm);
166 gstat[0] = gvals[1]/norm;
176 const std::vector<Real> &vstat,
178 const std::vector<Real> &xstat,
180 const Real
zero(0), one(1), two(2), three(3);
186 Real pvalp0 = ((
order_==one) ? bp : std::pow(bp,
order_));
187 Real pvalp1 = ((
order_==one) ? one
195 hvec_[3] +=
weight_ * pvalp1 * gv;
207 std::vector<Real> &hvstat,
209 const std::vector<Real> &vstat,
211 const std::vector<Real> &xstat,
213 const Real
zero(0), one(1), two(2);
214 std::vector<Real> gvals(5);
217 if ( gvals[0] >
zero ) {
218 Real norm0 = ((
order_==one) ? one
219 : ((
order_==two) ? std::sqrt(gvals[0])
221 Real norm1 = ((
order_==one) ? gvals[0]
223 hvstat[0] = (
order_-one)*((gvals[2]/norm0 - gvals[1]*gvals[1]/norm1)*vstat[0]
224 +xstat[0]*(gvals[4]/norm0 - gvals[3]*gvals[1]/norm1))
228 hv.
scale(xstat[0]/norm0);
231 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.