44 #ifndef ROL_CVAR_BOUND_CONSTRAINT_H
45 #define ROL_CVAR_BOUND_CONSTRAINT_H
55 Teuchos::RCP<BoundConstraint<Real> >
bc_;
61 Teuchos::RCP<const Vector<Real> > xv =
63 bc_->update(*xv,flag,iter);
67 Teuchos::RCP<Vector<Real> > xv = Teuchos::rcp_const_cast<
Vector<Real> >(
73 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
75 Teuchos::RCP<const Vector<Real> > xv =
77 bc_->pruneUpperActive(*vv,*xv,eps);
81 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
83 Teuchos::RCP<const Vector<Real> > gv =
85 Teuchos::RCP<const Vector<Real> > xv =
87 bc_->pruneUpperActive(*vv,*gv,*xv,eps);
91 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
93 Teuchos::RCP<const Vector<Real> > xv =
95 bc_->pruneLowerActive(*vv,*xv,eps);
99 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
101 Teuchos::RCP<const Vector<Real> > gv =
103 Teuchos::RCP<const Vector<Real> > xv =
105 bc_->pruneLowerActive(*vv,*gv,*xv,eps);
109 Teuchos::RCP<Vector<Real> > uv = Teuchos::rcp_const_cast<
Vector<Real> >(
111 bc_->setVectorToUpperBound(*uv);
117 Teuchos::RCP<Vector<Real> > lv = Teuchos::rcp_const_cast<
Vector<Real> >(
119 bc_->setVectorToLowerBound(*lv);
125 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
127 Teuchos::RCP<const Vector<Real> > xv =
129 bc_->pruneActive(*vv,*xv,eps);
133 Teuchos::RCP<Vector<Real> > vv = Teuchos::rcp_const_cast<
Vector<Real> >(
135 Teuchos::RCP<const Vector<Real> > gv =
137 Teuchos::RCP<const Vector<Real> > xv =
139 bc_->pruneActive(*vv,*gv,*xv,eps);
143 Teuchos::RCP<const Vector<Real> > vv =
145 if (
bc_->isActivated() ) {
146 return bc_->isFeasible(*vv);
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the lower -active set.
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the upper -binding set.
bool isFeasible(const Vector< Real > &v)
Check if the vector, v, is feasible.
void project(Vector< Real > &x)
Project optimization variables onto the bounds.
Defines the linear algebra or vector space interface.
void pruneActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the -active set.
void setVectorToUpperBound(Vector< Real > &u)
Set the input vector to the upper bound.
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update bounds.
Teuchos::RCP< BoundConstraint< Real > > bc_
Provides the interface to apply upper and lower bound constraints.
CVaRBoundConstraint(Teuchos::RCP< BoundConstraint< Real > > &bc)
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the upper -active set.
void pruneActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the -binding set.
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the lower -binding set.
static const double ROL_OVERFLOW
Platform-dependent maximum double.
void setVectorToLowerBound(Vector< Real > &l)
Set the input vector to the lower bound.