44#ifndef ROL_SIMULATED_BOUND_CONSTRAINT_H
45#define ROL_SIMULATED_BOUND_CONSTRAINT_H
62 const Ptr<BoundConstraint<Real>>
bnd_;
70 catch (
const std::bad_cast &e) {
79 catch (
const std::bad_cast &e) {
90 int nsamp =
sampler_->numMySamples();
91 std::vector<Ptr<Vector<Real>>> lvec(nsamp), uvec(nsamp);
92 for (
int k=0; k<
sampler_->numMySamples(); ++k) {
93 lvec[k] =
bnd_->getLowerBound()->clone();
94 lvec[k]->set(*
bnd_->getLowerBound());
95 uvec[k] =
bnd_->getUpperBound()->clone();
96 uvec[k]->set(*
bnd_->getUpperBound());
98 l_ = makePtr<SimulatedVector<Real>>(lvec,
sampler_->getBatchManager());
99 u_ = makePtr<SimulatedVector<Real>>(uvec,
sampler_->getBatchManager());
103 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
104 if(
bnd_->isActivated() ) {
111 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
112 if(
bnd_->isActivated() ) {
119 if(
bnd_->isActivated() ) {
120 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
127 if(
bnd_->isActivated() ) {
128 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
135 if(
bnd_->isActivated() ) {
136 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
143 if(
bnd_->isActivated() ) {
144 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
159 bool feasible =
true;
160 if(
bnd_->isActivated()) {
161 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
169 if(
bnd_->isActivated() ) {
170 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
177 if(
bnd_->isActivated() ) {
178 for(
int k=0; k<
sampler_->numMySamples(); ++k ) {
const Vector< Real > & getVector(const Vector< Real > &x, int k) const
const Ptr< const Vector< Real > > getLowerBound(void) const
Return the ref count pointer to the lower bound vector.
void projectInterior(Vector< Real > &x)
const Ptr< SampleGenerator< Real > > sampler_
void applyInverseScalingFunction(Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const
Vector< Real > & getVector(Vector< Real > &x, int k) const
~SimulatedBoundConstraint()
void project(Vector< Real > &x)
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0))
bool isFeasible(const Vector< Real > &v)
const Ptr< const Vector< Real > > getUpperBound(void) const
Return the ref count pointer to the upper bound vector.
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0))
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &x, Real eps=Real(0))
const Ptr< BoundConstraint< Real > > bnd_
SimulatedBoundConstraint(const Ptr< SampleGenerator< Real > > &sampler, const Ptr< BoundConstraint< Real > > &bnd)
void applyScalingFunctionJacobian(Vector< Real > &dv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g) const
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real xeps=Real(0), Real geps=Real(0))
Defines the linear algebra of a vector space on a generic partitioned vector where the individual vec...
ROL::Ptr< const Vector< Real > > get(size_type i) const
Defines the linear algebra or vector space interface.