44 #ifndef ROL_TYPEBINDICATOROBJECTIVE_H
45 #define ROL_TYPEBINDICATOROBJECTIVE_H
60 template<
typename Real>
63 const Ptr<PolyhedralProjection<Real>>
proj_;
64 const Ptr<Vector<Real>>
res_;
89 auto xz = x.
clone(); xz->zero();
90 Real tol(std::sqrt(ROL_EPSILON<Real>()));
91 tol_ =
static_cast<Real
>(1e-2)*tol;
92 proj_->getLinearConstraint()->value(*
res_,*xz,tol);
93 Real rnorm =
res_->norm();
94 if (rnorm > ROL_EPSILON<Real>())
tol_ *= rnorm;
102 bool isBndFeasible =
proj_->getBoundConstraint()->isFeasible(x);
103 bool isConFeasible =
true;
104 if (
res_ != nullPtr) {
105 proj_->getLinearConstraint()->value(*
res_,x,tol);
106 if (
res_->norm() >
tol_) isConFeasible =
false;
108 return (isBndFeasible && isConFeasible) ? zero : ROL_INF<Real>();
Provides the interface to evaluate objective functions.
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
void initialize(const Vector< Real > &x)
TypeBIndicatorObjective(const Ptr< PolyhedralProjection< Real >> &proj)
Real value(const Vector< Real > &x, Real &tol)
Compute value.
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)
Provides the interface to evaluate the indicator function of linear constraints.
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)
Defines the linear algebra or vector space interface.
const Ptr< PolyhedralProjection< Real > > proj_
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
TypeBIndicatorObjective(const Ptr< BoundConstraint< Real >> &bnd)
Provides the interface to apply upper and lower bound constraints.
virtual void set(const Vector &x)
Set where .
const Ptr< Vector< Real > > res_
Defines the general constraint operator interface.