72 Ptr<const std::vector<Real> > ex
74 return 100.0 * std::pow((*ex)[1] - std::pow((*ex)[0],2.0),2.0) + std::pow(1.0-(*ex)[0],2.0);
78 Ptr<std::vector<Real> > eg
80 Ptr<const std::vector<Real> > ex
83 (*eg)[0] = -4.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
84 (*eg)[1] = 2.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0));
88 Ptr<std::vector<Real> > ehv
90 Ptr<const std::vector<Real> > ev
92 Ptr<const std::vector<Real> > ex
95 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
96 Real h22 = 2.0 * 100.0;
97 Real h12 = -4.0 * 100.0 * (*ex)[0];
98 Real h21 = -4.0 * 100.0 * (*ex)[0];
100 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1];
101 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1];
105 Ptr<std::vector<Real> > ehv
107 Ptr<const std::vector<Real> > ev
109 Ptr<const std::vector<Real> > ex
112 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
113 Real h22 = 2.0 * 100.0;
114 Real h12 = -4.0 * 100.0 * (*ex)[0];
115 Real h21 = -4.0 * 100.0 * (*ex)[0];
117 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
118 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
129 return makePtr<Objective_HS1<Real>>();
136 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(n,0.0);
137 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
138 return makePtr<StdVector<Real>>(x0p);
145 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(n,0.0);
146 (*xp)[0] = 1.0; (*xp)[1] = 1.0;
147 return makePtr<StdVector<Real>>(xp);
154 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(n,0.0);
155 (*lp)[0] = ROL_NINF<Real>(); (*lp)[1] = -1.5;
156 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
158 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(n,0.0);
159 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
160 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
162 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