72 Teuchos::RCP<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 Teuchos::RCP<std::vector<Real> > eg
80 Teuchos::RCP<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 Teuchos::RCP<std::vector<Real> > ehv
90 Teuchos::RCP<const std::vector<Real> > ev
92 Teuchos::RCP<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 Teuchos::RCP<std::vector<Real> > ehv
107 Teuchos::RCP<const std::vector<Real> > ev
109 Teuchos::RCP<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]);
131 Teuchos::RCP<std::vector<Real> > x0p = Teuchos::rcp(
new std::vector<Real>(n,0.0));
132 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
136 Teuchos::RCP<std::vector<Real> > xp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
137 (*xp)[0] = 1.0; (*xp)[1] = 1.0;
144 Teuchos::RCP<std::vector<Real> > lp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
145 (*lp)[0] = ROL_NINF<Real>(); (*lp)[1] = -1.5;
149 Teuchos::RCP<std::vector<Real> > up = Teuchos::rcp(
new std::vector<Real>(n,0.0));
150 (*up)[0] = ROL_INF<Real>(); (*up)[1] = ROL_INF<Real>();
Provides the interface to evaluate objective functions.
W. Hock and K. Schittkowski 1st test function.
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.
Defines the linear algebra or vector space interface.
void getHS1(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Teuchos::RCP< Vector< Real > > &x0, Teuchos::RCP< Vector< Real > > &x)
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to apply upper and lower bound constraints.
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
Real value(const Vector< Real > &x, Real &tol)
Compute value.