38 Ptr<const std::vector<Real> > ex
40 return 100.0 * std::pow((*ex)[1] - std::pow((*ex)[0],2.0),2.0) + std::pow(1.0-(*ex)[0],2.0);
44 Ptr<std::vector<Real> > eg
46 Ptr<const std::vector<Real> > ex
49 (*eg)[0] = -4.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
50 (*eg)[1] = 2.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0));
54 Ptr<std::vector<Real> > ehv
56 Ptr<const std::vector<Real> > ev
58 Ptr<const std::vector<Real> > ex
61 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
62 Real h22 = 2.0 * 100.0;
63 Real h12 = -4.0 * 100.0 * (*ex)[0];
64 Real h21 = -4.0 * 100.0 * (*ex)[0];
66 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1];
67 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1];
71 Ptr<std::vector<Real> > ehv
73 Ptr<const std::vector<Real> > ev
75 Ptr<const std::vector<Real> > ex
78 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
79 Real h22 = 2.0 * 100.0;
80 Real h12 = -4.0 * 100.0 * (*ex)[0];
81 Real h21 = -4.0 * 100.0 * (*ex)[0];
83 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
84 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
95 return makePtr<Objective_HS1<Real>>();
102 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(n,0.0);
103 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
104 return makePtr<StdVector<Real>>(x0p);
111 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(n,0.0);
112 (*xp)[0] = 1.0; (*xp)[1] = 1.0;
113 return makePtr<StdVector<Real>>(xp);
120 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(n,0.0);
121 (*lp)[0] = ROL_NINF<Real>(); (*lp)[1] = -1.5;
122 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
124 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(n,0.0);
125 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
126 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
128 return makePtr<Bounds<Real>>(l,u);
Contains definitions of test objective functions.
Contains definitions of custom data types in ROL.
Provides the interface to evaluate objective functions.
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Provides the ROL::Vector interface for scalar values, to be used, for example, with scalar constraint...
Defines the linear algebra or vector space interface.
W. Hock and K. Schittkowski 1st test function.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Ptr< Vector< Real > > getSolution(const int i=0) const
Ptr< Vector< Real > > getInitialGuess(void) const
Ptr< Objective< Real > > getObjective(void) const