92 return static_cast<Real
>(100) * std::pow((*ex)[1] - std::pow((*ex)[0],2),2)
93 + std::pow(static_cast<Real>(1)-(*ex)[0],2);
101 (*eg)[0] =
static_cast<Real
>(-400) * ((*ex)[1] - std::pow((*ex)[0],2))
102 * (*ex)[0] -
static_cast<Real
>(2) * (static_cast<Real>(1)-(*ex)[0]);
103 (*eg)[1] =
static_cast<Real
>(200) * ((*ex)[1] - std::pow((*ex)[0],2));
113 Real h11 =
static_cast<Real
>(-400) * (*ex)[1]
114 +
static_cast<Real
>(1200) * std::pow((*ex)[0],2)
115 + static_cast<Real>(2);
116 Real h22 =
static_cast<Real
>(200);
117 Real h12 =
static_cast<Real
>(-400) * (*ex)[0];
118 Real h21 =
static_cast<Real
>(-400) * (*ex)[0];
122 (*ehv)[0] = (h11+alpha) * (*ev)[0] + h12 * (*ev)[1];
123 (*ehv)[1] = h21 * (*ev)[0] + (h22+alpha) * (*ev)[1];
133 Real h11 =
static_cast<Real
>(-400) * (*ex)[1]
134 +
static_cast<Real
>(1200) * std::pow((*ex)[0],2)
135 + static_cast<Real>(2);
136 Real h22 =
static_cast<Real
>(200);
137 Real h12 =
static_cast<Real
>(-400) * (*ex)[0];
138 Real h21 =
static_cast<Real
>(-400) * (*ex)[0];
140 (*ehv)[0] =
static_cast<Real
>(1)/(h11*h22 - h12*h21)
141 * (h22 * (*ev)[0] - h12 * (*ev)[1]);
142 (*ehv)[1] =
static_cast<Real
>(1)/(h11*h22 - h12*h21)
143 * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
154 return makePtr<Objective_HS2<Real>>();
161 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(n,0.0);
162 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
163 return makePtr<StdVector<Real>>(x0p);
170 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(n,0.0);
171 Real a = std::sqrt(598.0/1200.0);
172 Real b = 400.0 * std::pow(a,3.0);
173 (*xp)[0] = 2.0*a*std::cos(1.0/3.0 * std::acos(1.0/b));
175 return makePtr<StdVector<Real>>(xp);
182 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(n,0.0);
183 (*lp)[0] = ROL_NINF<Real>(); (*lp)[1] = 1.5;
184 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
185 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(n,0.0);
186 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
187 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
188 return makePtr<Bounds<Real>>(l,u);
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.
Contains definitions of custom data types in ROL.
Ptr< const vector > getVector(const V &x)
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Ptr< Vector< Real > > getInitialGuess(void) const
Ptr< Objective< Real > > getObjective(void) const
Defines the linear algebra or vector space interface.
Ptr< vector > getVector(V &x)
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
Contains definitions of test objective functions.
std::vector< Real > vector
Ptr< Vector< Real > > getSolution(const int i=0) const
Real value(const Vector< Real > &x, Real &tol)
Compute value.
W. Hock and K. Schittkowski 2nd test function.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const