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) +
75 90.0 * std::pow((*ex)[3] - std::pow((*ex)[2],2.0),2.0) + std::pow(1.0-(*ex)[2],2.0) +
76 10.1 * (std::pow((*ex)[1] - 1.0,2.0) + std::pow((*ex)[3]-1.0,2.0)) +
77 19.8 * ((*ex)[1] - 1.0) * ((*ex)[3] - 1.0);
81 Teuchos::RCP<const std::vector<Real> > ex =
83 Teuchos::RCP<std::vector<Real> > eg =
84 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(g)).getVector());
85 (*eg)[0] = -4.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
86 (*eg)[1] = 2.0 * 100.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) +
87 2.0 * 10.1 * ((*ex)[1] - 1.0) + 19.8*((*ex)[3] - 1.0);
88 (*eg)[2] = -4.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) * (*ex)[2] - 2.0 * (1.0-(*ex)[2]);
89 (*eg)[3] = 2.0 * 90.0 * ((*ex)[3] - std::pow((*ex)[2],2.0)) +
90 2.0 * 10.1 * ((*ex)[3] - 1.0) + 19.8*((*ex)[1] - 1.0);
94 Teuchos::RCP<const std::vector<Real> > ex =
96 Teuchos::RCP<const std::vector<Real> > ev =
98 Teuchos::RCP<std::vector<Real> > ehv =
99 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(hv)).getVector());
101 Real h11 = -4.0 * 100.0 * (*ex)[1] + 12.0 * 100.0 * std::pow((*ex)[0],2.0) + 2.0;
102 Real h12 = -4.0 * 100.0 * (*ex)[0];
105 Real h21 = -4.0 * 100.0 * (*ex)[0];
106 Real h22 = 2.0 * 100.0 + 2.0 * 10.1;
111 Real h33 = -4.0 * 90.0 * (*ex)[3] + 12.0 * 90.0 * std::pow((*ex)[2],2.0) + 2.0;
112 Real h34 = -4.0 * 90.0 * (*ex)[2];
115 Real h43 = -4.0 * 90.0 * (*ex)[2];
116 Real h44 = 2.0 * 90.0 + 2.0 * 10.1;
118 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1] + h13 * (*ev)[2] + h14 * (*ev)[3];
119 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1] + h23 * (*ev)[2] + h24 * (*ev)[3];
120 (*ehv)[2] = h31 * (*ev)[0] + h32 * (*ev)[1] + h33 * (*ev)[2] + h34 * (*ev)[3];
121 (*ehv)[3] = h41 * (*ev)[0] + h42 * (*ev)[1] + h43 * (*ev)[2] + h44 * (*ev)[3];
130 Teuchos::RCP<std::vector<Real> > x0p =
131 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x0)).getVector());
132 Teuchos::RCP<std::vector<Real> > xp =
133 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x)).getVector());
142 std::vector<Real> l(n,-10.0);
143 std::vector<Real> u(n,10.0);
Contains definitions for std::vector bound constraints.
Provides the interface to evaluate objective functions.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
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.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
W. Hock and K. Schittkowski 38th test function.
void getHS38(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Vector< Real > &x0, Vector< Real > &x)
Provides the std::vector implementation of the ROL::Vector interface.
Provides the interface to apply upper and lower bound constraints.