58 return static_cast<Real
>(100) * std::pow((*ex)[1] - std::pow((*ex)[0],2),2)
59 + std::pow(static_cast<Real>(1)-(*ex)[0],2);
67 (*eg)[0] =
static_cast<Real
>(-400) * ((*ex)[1] - std::pow((*ex)[0],2))
68 * (*ex)[0] -
static_cast<Real
>(2) * (static_cast<Real>(1)-(*ex)[0]);
69 (*eg)[1] =
static_cast<Real
>(200) * ((*ex)[1] - std::pow((*ex)[0],2));
79 Real h11 =
static_cast<Real
>(-400) * (*ex)[1]
80 +
static_cast<Real
>(1200) * std::pow((*ex)[0],2)
81 + static_cast<Real>(2);
82 Real h22 =
static_cast<Real
>(200);
83 Real h12 =
static_cast<Real
>(-400) * (*ex)[0];
84 Real h21 =
static_cast<Real
>(-400) * (*ex)[0];
88 (*ehv)[0] = (h11+alpha) * (*ev)[0] + h12 * (*ev)[1];
89 (*ehv)[1] = h21 * (*ev)[0] + (h22+alpha) * (*ev)[1];
99 Real h11 =
static_cast<Real
>(-400) * (*ex)[1]
100 +
static_cast<Real
>(1200) * std::pow((*ex)[0],2)
101 + static_cast<Real>(2);
102 Real h22 =
static_cast<Real
>(200);
103 Real h12 =
static_cast<Real
>(-400) * (*ex)[0];
104 Real h21 =
static_cast<Real
>(-400) * (*ex)[0];
106 (*ehv)[0] =
static_cast<Real
>(1)/(h11*h22 - h12*h21)
107 * (h22 * (*ev)[0] - h12 * (*ev)[1]);
108 (*ehv)[1] =
static_cast<Real
>(1)/(h11*h22 - h12*h21)
109 * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
120 return makePtr<Objective_HS2<Real>>();
127 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(n,0.0);
128 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
129 return makePtr<StdVector<Real>>(x0p);
136 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(n,0.0);
137 Real a = std::sqrt(598.0/1200.0);
138 Real b = 400.0 * std::pow(a,3.0);
139 (*xp)[0] = 2.0*a*std::cos(1.0/3.0 * std::acos(1.0/b));
141 return makePtr<StdVector<Real>>(xp);
148 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(n,0.0);
149 (*lp)[0] = ROL_NINF<Real>(); (*lp)[1] = 1.5;
150 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
151 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(n,0.0);
152 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
153 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
154 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