72 Teuchos::RCP<const std::vector<Real> > ex =
74 return 1.0/3.0 * std::pow((*ex)[0] + 1.0,3.0) + (*ex)[1];
78 Teuchos::RCP<const std::vector<Real> > ex =
80 Teuchos::RCP<std::vector<Real> > eg =
81 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(g)).getVector());
82 (*eg)[0] = std::pow((*ex)[0] + 1.0,2.0);
87 Teuchos::RCP<const std::vector<Real> > ex =
89 Teuchos::RCP<const std::vector<Real> > ev =
91 Teuchos::RCP<std::vector<Real> > ehv =
92 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(hv)).getVector());
95 (*ehv)[0] = 2.0*((*ex)[0] + 1.0)*(*ev)[0] + alpha*(*ev)[0];
96 (*ehv)[1] = 0.0 + alpha*(*ev)[1];
105 Teuchos::RCP<std::vector<Real> > x0p =
106 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x0)).getVector());
107 Teuchos::RCP<std::vector<Real> > xp =
108 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x)).getVector());
117 std::vector<Real> l(n,0.0); l[0] = 1.0; l[1] = 0.0;
Contains definitions for std::vector bound constraints.
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.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Defines the linear algebra or vector space interface.
Provides the std::vector implementation of the ROL::Vector interface.
void getHS4(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Vector< Real > &x0, Vector< Real > &x)
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Provides the interface to apply upper and lower bound constraints.
W. Hock and K. Schittkowski 4th test function.
static const double ROL_OVERFLOW
Platform-dependent maximum double.