72 Teuchos::RCP<const std::vector<Real> > ex =
74 return (*ex)[1] + 1.e-5 * std::pow((*ex)[1] - (*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] = -1.e-5 * 2.0 * ((*ex)[1] - (*ex)[0]);
83 (*eg)[1] = 1.0 + 1.e-5 * 2.0 * ((*ex)[1] - (*ex)[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 = 1.e-5 * 2.0;
95 Real h22 = 1.e-5 * 2.0;
96 Real h12 = -1.e-5 * 2.0;
97 Real h21 = -1.e-5 * 2.0;
99 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1];
100 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1];
104 Teuchos::RCP<const std::vector<Real> > ex =
106 Teuchos::RCP<const std::vector<Real> > ev =
108 Teuchos::RCP<std::vector<Real> > ehv =
109 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(hv)).getVector());
111 Real h11 = 1.e-5 * 2.0;
112 Real h22 = 1.e-5 * 2.0;
113 Real h12 = -1.e-5 * 2.0;
114 Real h21 = -1.e-5 * 2.0;
116 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
117 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
125 Teuchos::RCP<std::vector<Real> > x0p =
126 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x0)).getVector());
127 Teuchos::RCP<std::vector<Real> > xp =
128 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x)).getVector());
137 std::vector<Real> l(n,0.0); l[0] = -
ROL_OVERFLOW; l[1] = 0.0;
Contains definitions for std::vector bound constraints.
Provides the interface to evaluate objective functions.
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.
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 getHS3(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.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to apply upper and lower bound constraints.
static const double ROL_OVERFLOW
Platform-dependent maximum double.
W. Hock and K. Schittkowski 3rd test function.