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<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] = -400.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
83 (*eg)[1] = 200.0 * ((*ex)[1] - std::pow((*ex)[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());
94 Real h11 = -400.0 * (*ex)[1] + 1200.0 * std::pow((*ex)[0],2.0) + 2.0;
96 Real h12 = -400.0 * (*ex)[0];
97 Real h21 = -400.0 * (*ex)[0];
101 (*ehv)[0] = (h11+alpha) * (*ev)[0] + h12 * (*ev)[1];
102 (*ehv)[1] = h21 * (*ev)[0] + (h22+alpha) * (*ev)[1];
106 Teuchos::RCP<const std::vector<Real> > ex =
108 Teuchos::RCP<const std::vector<Real> > ev =
110 Teuchos::RCP<std::vector<Real> > ehv =
111 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(hv)).getVector());
113 Real h11 = -400.0 * (*ex)[1] + 1200.0 * std::pow((*ex)[0],2.0) + 2.0;
115 Real h12 = -400.0 * (*ex)[0];
116 Real h21 = -400.0 * (*ex)[0];
118 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
119 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
127 Teuchos::RCP<std::vector<Real> > x0p =
128 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x0)).getVector());
129 Teuchos::RCP<std::vector<Real> > xp =
130 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x)).getVector());
139 std::vector<Real> l (n,0.0); l[0] = -0.1*
ROL_OVERFLOW; l[1] = 1.5;
146 Real a = std::sqrt(598.0/1200.0);
147 Real b = 400.0 * std::pow(a,3.0);
148 (*xp)[0] = 2.0*a*std::cos(1.0/3.0 * std::acos(1.0/b));
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 getHS2(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Vector< Real > &x0, Vector< Real > &x)
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
Provides the interface to apply upper and lower bound constraints.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
static const double ROL_OVERFLOW
Platform-dependent maximum double.
W. Hock and K. Schittkowski 2nd test function.