10#ifndef ROL_TYPEBINDICATOROBJECTIVE_H
11#define ROL_TYPEBINDICATOROBJECTIVE_H
26template<
typename Real>
29 const Ptr<PolyhedralProjection<Real>>
proj_;
30 const Ptr<Vector<Real>>
res_;
55 auto xz = x.
clone(); xz->zero();
57 tol_ =
static_cast<Real
>(1e-2)*tol;
58 proj_->getLinearConstraint()->value(*
res_,*xz,tol);
59 Real rnorm =
res_->norm();
68 bool isBndFeasible =
proj_->getBoundConstraint()->isFeasible(x);
69 bool isConFeasible =
true;
70 if (
res_ != nullPtr) {
71 proj_->getLinearConstraint()->value(*
res_,x,tol);
72 if (
res_->norm() >
tol_) isConFeasible =
false;
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0 zero)()
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
const Ptr< Vector< Real > > res_
void prox(Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
TypeBIndicatorObjective(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< Constraint< Real > > &con, const Vector< Real > &mul, const Vector< Real > &res, ParameterList &list)
const Ptr< PolyhedralProjection< Real > > proj_
Real value(const Vector< Real > &x, Real &tol)
TypeBIndicatorObjective(const Ptr< PolyhedralProjection< Real > > &proj)
void initialize(const Vector< Real > &x)
TypeBIndicatorObjective(const Ptr< BoundConstraint< Real > > &bnd)
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
Real ROL_EPSILON(void)
Platform-dependent machine epsilon.
Ptr< PolyhedralProjection< Real > > PolyhedralProjectionFactory(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< Constraint< Real > > &con, const Vector< Real > &mul, const Vector< Real > &res, ParameterList &list)