58 return 100.0 * std::pow((*ex)[1] - std::pow((*ex)[0],2.0),2.0) + std::pow(1.0-(*ex)[0],2.0) +
59 90.0 * std::pow((*ex)[3] - std::pow((*ex)[2],2.0),2.0) + std::pow(1.0-(*ex)[2],2.0) +
60 10.1 * (std::pow((*ex)[1] - 1.0,2.0) + std::pow((*ex)[3]-1.0,2.0)) +
61 19.8 * ((*ex)[1] - 1.0) * ((*ex)[3] - 1.0);
70 (*eg)[0] = -4.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
71 (*eg)[1] = 2.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) +
72 2.0 * 10.1 * ((*ex)[1] - 1.0) + 19.8*((*ex)[3] - 1.0);
73 (*eg)[2] = -4.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) * (*ex)[2] - 2.0 * (1.0-(*ex)[2]);
74 (*eg)[3] = 2.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) +
75 2.0 * 10.1 * ((*ex)[3] - 1.0) + 19.8*((*ex)[1] - 1.0);
85 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
86 Real h12 = -4.0 * 100.0 * (*ex)[0];
89 Real h21 = -4.0 * 100.0 * (*ex)[0];
90 Real h22 = 2.0 * 100.0 + 2.0 * 10.1;
95 Real h33 = -4.0 * 90.0 * (*ex)[3] + 12.0 * 90.0 * std::pow((*ex)[2],2.0) + 2.0;
96 Real h34 = -4.0 * 90.0 * (*ex)[2];
99 Real h43 = -4.0 * 90.0 * (*ex)[2];
100 Real h44 = 2.0 * 90.0 + 2.0 * 10.1;
102 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1] + h13 * (*ev)[2] + h14 * (*ev)[3];
103 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1] + h23 * (*ev)[2] + h24 * (*ev)[3];
104 (*ehv)[2] = h31 * (*ev)[0] + h32 * (*ev)[1] + h33 * (*ev)[2] + h34 * (*ev)[3];
105 (*ehv)[3] = h41 * (*ev)[0] + h42 * (*ev)[1] + h43 * (*ev)[2] + h44 * (*ev)[3];
117 return ROL::makePtr<Objective_HS38<Real>>();
124 ROL::Ptr<std::vector<Real> > x0p = ROL::makePtr<std::vector<Real>>(n,0.0);
125 (*x0p)[0] = -3.0; (*x0p)[1] = -1.0;
126 (*x0p)[2] = -3.0; (*x0p)[3] = -1.0;
127 return ROL::makePtr<StdVector<Real>>(x0p);
134 ROL::Ptr<std::vector<Real> > xp = ROL::makePtr<std::vector<Real>>(n,0.0);
135 (*xp)[0] = 1.0; (*xp)[1] = 1.0;
136 (*xp)[2] = 1.0; (*xp)[3] = 1.0;
137 return ROL::makePtr<StdVector<Real>>(xp);
144 ROL::Ptr<std::vector<Real> > lp = ROL::makePtr<std::vector<Real>>(n,-10.0);
145 ROL::Ptr<Vector<Real> > l = ROL::makePtr<StdVector<Real>>(lp);
146 ROL::Ptr<std::vector<Real> > up = ROL::makePtr<std::vector<Real>>(n, 10.0);
147 ROL::Ptr<Vector<Real> > u = ROL::makePtr<StdVector<Real>>(up);
148 return ROL::makePtr<Bounds<Real>>(l,u);
Provides the interface to evaluate objective functions.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
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.
std::vector< Real > vector
Defines the linear algebra or vector space interface.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
W. Hock and K. Schittkowski 38th test function.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Ptr< Vector< Real > > getSolution(const int i=0) const
Ptr< Vector< Real > > getInitialGuess(void) const
Contains definitions of test objective functions.
ROL::Ptr< const vector > getVector(const V &x)
ROL::Ptr< vector > getVector(V &x)
Ptr< Objective< Real > > getObjective(void) const