24 template<
typename Real>
40 class isGreater :
public Elementwise::BinaryFunction<Real> {
43 Real
apply(
const Real &x,
const Real &y)
const {
44 return (x > y) ?
static_cast<Real
>(1) : static_cast<Real>(0);
48 class Active :
public Elementwise::BinaryFunction<Real> {
51 Real
apply(
const Real &x,
const Real &y )
const {
52 return ((y <=
offset_) ? 0 : x);
61 Real
apply(
const Real &x,
const Real &y )
const {
71 Real
apply(
const Real &x,
const Real &y )
const {
80 Real
apply(
const Real &x,
const Real &y )
const {
81 return ((y == 1) ? x : 0);
85 class BuildC :
public Elementwise::UnaryFunction<Real> {
87 Real
apply(
const Real &x )
const {
88 const Real zeta(0.5), kappa(1);
89 return std::min(zeta * x, kappa);
95 Real
apply(
const Real &x,
const Real &y)
const {
97 return (x==zero ? y : x);
108 Real feasTol = std::sqrt(ROL_EPSILON<Real>()));
112 const Real scale = 1,
113 const Real feasTol = std::sqrt(ROL_EPSILON<Real>()));
LowerBinding(Real xeps, Real geps)
UpperBinding(Real xeps, Real geps)
Real apply(const Real &x, const Real &y) const
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.
Real apply(const Real &x, const Real &y) const
Defines the linear algebra or vector space interface.
Real apply(const Real &x, const Real &y) const
ROL::Bounds::isGreater isGreater_
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
void project(Vector< Real > &x) override
Project optimization variables onto the bounds.
Elementwise::ReductionMin< Real > minimum_
ROL::Bounds::BuildC buildC_
Bounds(const Vector< Real > &x, bool isLower=true, Real scale=1, Real feasTol=std::sqrt(ROL_EPSILON< Real >()))
Real apply(const Real &x) const
Provides the elementwise interface to apply upper and lower bound constraints.
void buildScalingFunction(Vector< Real > &d, const Vector< Real > &x, const Vector< Real > &g) 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
ROL::Bounds::SetZeroEntry setZeroEntry_
Real apply(const Real &x, const Real &y) const
Real apply(const Real &x, const Real &y) const
void applyInverseScalingFunction(Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const override
Apply inverse scaling function.
Elementwise::ReductionMax< Real > maximum_
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.
void applyScalingFunctionJacobian(Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const override
Apply scaling function Jacobian.