10 #ifndef ROL_REDUCE_LINEAR_CONSTRAINT_DEF_H
11 #define ROL_REDUCE_LINEAR_CONSTRAINT_DEF_H
15 template<
typename Real>
25 template<
typename Real>
27 return makePtr<AffineTransformObjective<Real>>(obj,nsop_,x_,storage_);
30 template<
typename Real>
32 return makePtr<AffineTransformConstraint<Real>>(con,nsop_,x_,storage_);
35 template<
typename Real>
40 template<
typename Real>
45 template<
typename Real>
47 Real tol = std::sqrt(ROL_EPSILON<Real>());
48 nsop_->apply(x,y,tol);
51 template<
typename Real>
56 template<
typename Real>
58 Real tol = std::sqrt(ROL_EPSILON<Real>());
59 Ptr<Vector<Real>> ran = c->clone();
60 lcon_->value(*ran,*x_,tol);
61 Real cnorm = ran->norm();
62 if ( cnorm > static_cast<Real>(1e-4)*tol ) {
64 Ptr<Vector<Real>> xzero = x_->clone(); xzero->zero();
65 lcon_->value(*ran,*xzero,tol);
66 ran->scale(static_cast<Real>(-1));
67 nsop_->apply(*xzero,*x_,tol);
68 rsop.
apply(*x_,*ran,tol);
Provides the interface to evaluate objective functions.
Projects on to the null space of a linear constraint.
void project(Vector< Real > &x, const Vector< Real > &y) const
Defines the linear algebra or vector space interface.
Projects on to the null space of a linear constraint.
Ptr< Objective< Real > > transform(const Ptr< Objective< Real >> &obj) const
Ptr< Constraint< Real > > getLinearConstraint(void) const
void feasible(const Ptr< const Vector< Real >> &c)
ReduceLinearConstraint(const Ptr< Constraint< Real >> &lcon, const Ptr< Vector< Real >> &x, const Ptr< const Vector< Real >> &c)
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
Ptr< const Vector< Real > > getFeasibleVector(void) const
Defines the general constraint operator interface.