44#ifndef ROL_REDUCE_LINEAR_CONSTRAINT_DEF_H
45#define ROL_REDUCE_LINEAR_CONSTRAINT_DEF_H
49template<
typename Real>
59template<
typename Real>
61 return makePtr<AffineTransformObjective<Real>>(obj,nsop_,x_,storage_);
64template<
typename Real>
66 return makePtr<AffineTransformConstraint<Real>>(con,nsop_,x_,storage_);
69template<
typename Real>
74template<
typename Real>
79template<
typename Real>
81 Real tol = std::sqrt(ROL_EPSILON<Real>());
82 nsop_->apply(x,y,tol);
85template<
typename Real>
90template<
typename Real>
92 Real tol = std::sqrt(ROL_EPSILON<Real>());
93 Ptr<Vector<Real>> ran = c->clone();
94 lcon_->value(*ran,*x_,tol);
95 Real cnorm = ran->norm();
96 if ( cnorm >
static_cast<Real
>(1e-4)*tol ) {
98 Ptr<Vector<Real>> xzero = x_->clone(); xzero->zero();
99 lcon_->value(*ran,*xzero,tol);
100 ran->scale(
static_cast<Real
>(-1));
101 nsop_->apply(*xzero,*x_,tol);
102 rsop.
apply(*x_,*ran,tol);
Defines the general constraint operator interface.
Projects on to the null space of a linear constraint.
Provides the interface to evaluate objective functions.
Projects on to the null space of a linear constraint.
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
Ptr< const Vector< Real > > getFeasibleVector(void) const
Ptr< Objective< Real > > transform(const Ptr< Objective< Real > > &obj) const
ReduceLinearConstraint(const Ptr< Constraint< Real > > &lcon, const Ptr< Vector< Real > > &x, const Ptr< const Vector< Real > > &c)
void feasible(const Ptr< const Vector< Real > > &c)
void project(Vector< Real > &x, const Vector< Real > &y) const
Ptr< Constraint< Real > > getLinearConstraint(void) const
Defines the linear algebra or vector space interface.