|
ROL
|
Provides the elementwise interface to apply upper and lower bound constraints. More...
#include <ROL_Bounds.hpp>
Inheritance diagram for ROL::Bounds< Real >:Classes | |
| class | Active |
| class | BuildC |
| class | LowerBinding |
| class | PruneBinding |
| class | SetZeroEntry |
| class | UpperBinding |
Public Member Functions | |
| Bounds (const Vector< Real > &x, bool isLower=true, Real scale=1, Real feasTol=std::sqrt(ROL_EPSILON< Real >())) | |
| Bounds (const Ptr< Vector< Real > > &x_lo, const Ptr< Vector< Real > > &x_up, const Real scale=1, const Real feasTol=std::sqrt(ROL_EPSILON< Real >())) | |
| void | project (Vector< Real > &x) override |
| void | projectInterior (Vector< Real > &x) override |
| void | pruneUpperActive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) override |
| void | pruneUpperActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) override |
| void | pruneLowerActive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) override |
| void | pruneLowerActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) override |
| bool | isFeasible (const Vector< Real > &v) override |
| void | applyInverseScalingFunction (Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const override |
| void | applyScalingFunctionJacobian (Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const override |
Public Member Functions inherited from ROL::ROL::BoundConstraint< Real > | |
| virtual | ~BoundConstraint () |
| BoundConstraint (void) | |
| BoundConstraint (const Vector< Real > &x) | |
| virtual void | project (Vector< Real > &x) |
| Project optimization variables onto the bounds. | |
| virtual void | projectInterior (Vector< Real > &x) |
| Project optimization variables into the interior of the feasible set. | |
| virtual void | pruneUpperActive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the upper \(\epsilon\)-active set. | |
| virtual void | pruneUpperActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the upper \(\epsilon\)-binding set. | |
| virtual void | pruneLowerActive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the lower \(\epsilon\)-active set. | |
| virtual void | pruneLowerActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-binding set. | |
| virtual const Ptr< const Vector< Real > > | getLowerBound (void) const |
| Return the ref count pointer to the lower bound vector. | |
| virtual const Ptr< const Vector< Real > > | getUpperBound (void) const |
| Return the ref count pointer to the upper bound vector. | |
| virtual bool | isFeasible (const Vector< Real > &v) |
| Check if the vector, v, is feasible. | |
| virtual void | applyInverseScalingFunction (Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const |
| Apply inverse scaling function. | |
| virtual void | applyScalingFunctionJacobian (Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const |
| Apply scaling function Jacobian. | |
| void | activateLower (void) |
| Turn on lower bound. | |
| void | activateUpper (void) |
| Turn on upper bound. | |
| void | activate (void) |
| Turn on bounds. | |
| void | deactivateLower (void) |
| Turn off lower bound. | |
| void | deactivateUpper (void) |
| Turn off upper bound. | |
| void | deactivate (void) |
| Turn off bounds. | |
| bool | isLowerActivated (void) const |
| Check if lower bound are on. | |
| bool | isUpperActivated (void) const |
| Check if upper bound are on. | |
| bool | isActivated (void) const |
| Check if bounds are on. | |
| void | pruneActive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-active set. | |
| void | pruneActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-binding set. | |
| void | pruneLowerInactive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-inactive set. | |
| void | pruneUpperInactive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-inactive set. | |
| void | pruneLowerInactive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-nonbinding set. | |
| void | pruneUpperInactive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-nonbinding set. | |
| void | pruneInactive (Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-inactive set. | |
| void | pruneInactive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0)) |
| Set variables to zero if they correspond to the \(\epsilon\)-nonbinding set. | |
| void | computeProjectedGradient (Vector< Real > &g, const Vector< Real > &x) |
| Compute projected gradient. | |
| void | computeProjectedStep (Vector< Real > &v, const Vector< Real > &x) |
| Compute projected step. | |
Private Member Functions | |
| void | buildScalingFunction (Vector< Real > &d, const Vector< Real > &x, const Vector< Real > &g) const |
Private Attributes | |
| const Real | scale_ |
| const Real | feasTol_ |
| Ptr< Vector< Real > > | mask_ |
| Real | min_diff_ |
| Elementwise::ReductionMin< Real > | minimum_ |
| ROL::Bounds::PruneBinding | prune_ |
| ROL::Bounds::BuildC | buildC_ |
| ROL::Bounds::SetZeroEntry | setZeroEntry_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::ROL::BoundConstraint< Real > | |
| Real | computeInf (const Vector< Real > &x) const |
Protected Attributes inherited from ROL::ROL::BoundConstraint< Real > | |
| Ptr< Vector< Real > > | lower_ |
| Ptr< Vector< Real > > | upper_ |
Provides the elementwise interface to apply upper and lower bound constraints.
Definition at line 59 of file ROL_Bounds.hpp.
| Bounds::Bounds | ( | const Vector< Real > & | x, |
| bool | isLower = true, | ||
| Real | scale = 1, | ||
| Real | feasTol = std::sqrt(ROL_EPSILON<Real>()) ) |
Definition at line 59 of file ROL_Bounds_Def.hpp.
References ROL::BoundConstraint< Real >::activateLower(), ROL::BoundConstraint< Real >::activateUpper(), ROL::Vector< Real >::clone(), ROL::BoundConstraint< Real >::computeInf(), feasTol_, ROL::ROL::BoundConstraint< Real >::lower_, mask_, min_diff_, ROL::ROL_INF(), scale_, and ROL::ROL::BoundConstraint< Real >::upper_.
| Bounds::Bounds | ( | const Ptr< Vector< Real > > & | x_lo, |
| const Ptr< Vector< Real > > & | x_up, | ||
| const Real | scale = 1, | ||
| const Real | feasTol = std::sqrt(ROL_EPSILON<Real>()) ) |
Definition at line 76 of file ROL_Bounds_Def.hpp.
References feasTol_, ROL::ROL::BoundConstraint< Real >::lower_, mask_, min_diff_, minimum_, scale_, and ROL::ROL::BoundConstraint< Real >::upper_.
|
private |
Definition at line 232 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::Vector< Real >::axpy(), buildC_, ROL::ROL::BoundConstraint< Real >::lower_, mask_, ROL::Vector< Real >::plus(), ROL::Vector< Real >::set(), ROL::Vector< Real >::setScalar(), ROL::ROL::BoundConstraint< Real >::upper_, and zero.
Referenced by applyInverseScalingFunction(), and applyScalingFunctionJacobian().
|
override |
Definition at line 91 of file ROL_Bounds_Def.hpp.
References ROL::apply(), ROL::Vector< Real >::applyBinary(), ROL::BoundConstraint< Real >::isLowerActivated(), ROL::BoundConstraint< Real >::isUpperActivated(), ROL::ROL::BoundConstraint< Real >::lower_, and ROL::ROL::BoundConstraint< Real >::upper_.
|
override |
Definition at line 109 of file ROL_Bounds_Def.hpp.
References ROL::apply(), ROL::Vector< Real >::applyBinary(), feasTol_, ROL::BoundConstraint< Real >::isLowerActivated(), ROL::BoundConstraint< Real >::isUpperActivated(), ROL::ROL::BoundConstraint< Real >::lower_, min_diff_, ROL::ROL_EPSILON(), and ROL::ROL::BoundConstraint< Real >::upper_.
Referenced by testRandomInputs().
|
override |
Definition at line 156 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::BoundConstraint< Real >::isUpperActivated(), mask_, min_diff_, scale_, and ROL::ROL::BoundConstraint< Real >::upper_.
|
override |
Definition at line 169 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::BoundConstraint< Real >::isUpperActivated(), mask_, min_diff_, prune_, scale_, and ROL::ROL::BoundConstraint< Real >::upper_.
|
override |
Definition at line 184 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::BoundConstraint< Real >::isLowerActivated(), ROL::ROL::BoundConstraint< Real >::lower_, mask_, min_diff_, and scale_.
|
override |
Definition at line 197 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::BoundConstraint< Real >::isLowerActivated(), ROL::ROL::BoundConstraint< Real >::lower_, mask_, min_diff_, prune_, and scale_.
|
override |
Definition at line 212 of file ROL_Bounds_Def.hpp.
References ROL::BoundConstraint< Real >::isLowerActivated(), ROL::BoundConstraint< Real >::isUpperActivated(), ROL::ROL::BoundConstraint< Real >::lower_, mask_, minimum_, and ROL::ROL::BoundConstraint< Real >::upper_.
|
override |
Definition at line 292 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), and buildScalingFunction().
Referenced by testCases(), and testRandomInputs().
|
override |
Definition at line 298 of file ROL_Bounds_Def.hpp.
References ROL::Vector< Real >::applyBinary(), ROL::Vector< Real >::axpy(), buildC_, buildScalingFunction(), ROL::ROL::BoundConstraint< Real >::lower_, mask_, ROL::Vector< Real >::plus(), ROL::Vector< Real >::setScalar(), setZeroEntry_, and ROL::ROL::BoundConstraint< Real >::upper_.
Referenced by testCases(), and testRandomInputs().
|
private |
Definition at line 61 of file ROL_Bounds.hpp.
Referenced by Bounds(), Bounds(), pruneLowerActive(), pruneLowerActive(), pruneUpperActive(), and pruneUpperActive().
|
private |
Definition at line 62 of file ROL_Bounds.hpp.
Referenced by Bounds(), Bounds(), and projectInterior().
|
private |
Definition at line 67 of file ROL_Bounds.hpp.
Referenced by applyScalingFunctionJacobian(), Bounds(), Bounds(), buildScalingFunction(), isFeasible(), pruneLowerActive(), pruneLowerActive(), pruneUpperActive(), and pruneUpperActive().
|
private |
Definition at line 69 of file ROL_Bounds.hpp.
Referenced by Bounds(), Bounds(), projectInterior(), pruneLowerActive(), pruneLowerActive(), pruneUpperActive(), and pruneUpperActive().
|
private |
Definition at line 71 of file ROL_Bounds.hpp.
Referenced by Bounds(), and isFeasible().
|
private |
Referenced by pruneLowerActive(), and pruneUpperActive().
|
private |
Referenced by applyScalingFunctionJacobian(), and buildScalingFunction().
|
private |
Referenced by applyScalingFunctionJacobian().