92 return 100.0 * std::pow((*ex)[1] - std::pow((*ex)[0],2.0),2.0) + std::pow(1.0-(*ex)[0],2.0) +
93 90.0 * std::pow((*ex)[3] - std::pow((*ex)[2],2.0),2.0) + std::pow(1.0-(*ex)[2],2.0) +
94 10.1 * (std::pow((*ex)[1] - 1.0,2.0) + std::pow((*ex)[3]-1.0,2.0)) +
95 19.8 * ((*ex)[1] - 1.0) * ((*ex)[3] - 1.0);
101 ROL::Ptr<const vector> ex =
getVector(x);
104 (*eg)[0] = -4.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
105 (*eg)[1] = 2.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) +
106 2.0 * 10.1 * ((*ex)[1] - 1.0) + 19.8*((*ex)[3] - 1.0);
107 (*eg)[2] = -4.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) * (*ex)[2] - 2.0 * (1.0-(*ex)[2]);
108 (*eg)[3] = 2.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) +
109 2.0 * 10.1 * ((*ex)[3] - 1.0) + 19.8*((*ex)[1] - 1.0);
115 ROL::Ptr<const vector> ex =
getVector(x);
116 ROL::Ptr<const vector> ev =
getVector(v);
119 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
120 Real h12 = -4.0 * 100.0 * (*ex)[0];
123 Real h21 = -4.0 * 100.0 * (*ex)[0];
124 Real h22 = 2.0 * 100.0 + 2.0 * 10.1;
129 Real h33 = -4.0 * 90.0 * (*ex)[3] + 12.0 * 90.0 * std::pow((*ex)[2],2.0) + 2.0;
130 Real h34 = -4.0 * 90.0 * (*ex)[2];
133 Real h43 = -4.0 * 90.0 * (*ex)[2];
134 Real h44 = 2.0 * 90.0 + 2.0 * 10.1;
136 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1] + h13 * (*ev)[2] + h14 * (*ev)[3];
137 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1] + h23 * (*ev)[2] + h24 * (*ev)[3];
138 (*ehv)[2] = h31 * (*ev)[0] + h32 * (*ev)[1] + h33 * (*ev)[2] + h34 * (*ev)[3];
139 (*ehv)[3] = h41 * (*ev)[0] + h42 * (*ev)[1] + h43 * (*ev)[2] + h44 * (*ev)[3];
151 return ROL::makePtr<Objective_HS38<Real>>();
158 ROL::Ptr<std::vector<Real> > x0p = ROL::makePtr<std::vector<Real>>(n,0.0);
159 (*x0p)[0] = -3.0; (*x0p)[1] = -1.0;
160 (*x0p)[2] = -3.0; (*x0p)[3] = -1.0;
161 return ROL::makePtr<StdVector<Real>>(x0p);
168 ROL::Ptr<std::vector<Real> > xp = ROL::makePtr<std::vector<Real>>(n,0.0);
169 (*xp)[0] = 1.0; (*xp)[1] = 1.0;
170 (*xp)[2] = 1.0; (*xp)[3] = 1.0;
171 return ROL::makePtr<StdVector<Real>>(xp);
178 ROL::Ptr<std::vector<Real> > lp = ROL::makePtr<std::vector<Real>>(n,-10.0);
179 ROL::Ptr<Vector<Real> > l = ROL::makePtr<StdVector<Real>>(lp);
180 ROL::Ptr<std::vector<Real> > up = ROL::makePtr<std::vector<Real>>(n, 10.0);
181 ROL::Ptr<Vector<Real> > u = ROL::makePtr<StdVector<Real>>(up);
182 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