92 return 1.0/3.0 * std::pow((*ex)[0] + 1.0,3.0) + (*ex)[1];
100 (*eg)[0] = std::pow((*ex)[0] + 1.0,2.0);
106 ROL::Ptr<const vector> ex =
getVector(x);
107 ROL::Ptr<const vector> ev =
getVector(v);
111 (*ehv)[0] = 2.0*((*ex)[0] + 1.0)*(*ev)[0] + alpha*(*ev)[0];
112 (*ehv)[1] = 0.0 + alpha*(*ev)[1];
124 return ROL::makePtr<Objective_HS4<Real>>();
131 ROL::Ptr<std::vector<Real> > x0p = ROL::makePtr<std::vector<Real>>(n,0.0);
132 (*x0p)[0] = 1.125; (*x0p)[1] = 0.125;
133 return ROL::makePtr<StdVector<Real>>(x0p);
140 ROL::Ptr<std::vector<Real> > xp = ROL::makePtr<std::vector<Real>>(n,0.0);
141 (*xp)[0] = 1.0; (*xp)[1] = 0.0;
142 return ROL::makePtr<StdVector<Real>>(xp);
149 ROL::Ptr<std::vector<Real> > lp = ROL::makePtr<std::vector<Real>>(n,0.0);
150 (*lp)[0] = 1.0; (*lp)[1] = 0.0;
151 ROL::Ptr<Vector<Real> > l = ROL::makePtr<StdVector<Real>>(lp);
152 ROL::Ptr<std::vector<Real> > up = ROL::makePtr<std::vector<Real>>(n,0.0);
153 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
154 ROL::Ptr<Vector<Real> > u = ROL::makePtr<StdVector<Real>>(up);
155 return ROL::makePtr<Bounds<Real>>(l,u);
ROL::Ptr< const vector > getVector(const V &x)
Provides the interface to evaluate objective functions.
std::vector< Real > vector
Ptr< Vector< Real > > getSolution(const int i=0) const
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Contains definitions of custom data types in ROL.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Defines the linear algebra or vector space interface.
Ptr< Vector< Real > > getInitialGuess(void) const
Ptr< Objective< Real > > getObjective(void) const
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Contains definitions of test objective functions.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
W. Hock and K. Schittkowski 4th test function.
ROL::Ptr< vector > getVector(V &x)