58 template<
typename Real>
73 class Active :
public Elementwise::BinaryFunction<Real> {
76 Real
apply(
const Real &x,
const Real &y )
const {
77 return ((y <=
offset_) ? 0 : x);
86 Real
apply(
const Real &x,
const Real &y )
const {
96 Real
apply(
const Real &x,
const Real &y )
const {
105 Real
apply(
const Real &x,
const Real &y )
const {
106 return ((y == 1) ? x : 0);
115 Real feasTol = 1e-2);
119 const Real scale = 1,
120 const Real feasTol = 1e-2);
LowerBinding(Real xeps, Real geps)
UpperBinding(Real xeps, Real geps)
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) override
Set variables to zero if they correspond to the upper -active set.
Defines the linear algebra or vector space interface.
Real apply(const Real &x, const Real &y) const
void project(Vector< Real > &x) override
Project optimization variables onto the bounds.
Elementwise::ReductionMin< Real > minimum_
Real apply(const Real &x, const Real &y) const
Provides the elementwise interface to apply upper and lower bound constraints.
Real apply(const Real &x, const Real &y) const
bool isFeasible(const Vector< Real > &v) override
Check if the vector, v, is feasible.
ROL::Bounds::PruneBinding prune_
Provides the interface to apply upper and lower bound constraints.
Real apply(const Real &x, const Real &y) const
Bounds(const Vector< Real > &x, bool isLower=true, Real scale=1, Real feasTol=1e-2)
Ptr< Vector< Real > > mask_
void projectInterior(Vector< Real > &x) override
Project optimization variables into the interior of the feasible set.
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) override
Set variables to zero if they correspond to the lower -active set.