75 for (
int i = 0; i < this->
dim_; i++ ) {
81 Teuchos::RCP<const std::vector<Real> > ex =
84 for (
int i = 0; i < this->
dim_; i++ ) {
87 return 2.0 - prod/this->
fact_;
91 Teuchos::RCP<const std::vector<Real> > ex =
93 Teuchos::RCP<std::vector<Real> > eg =
94 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(g)).getVector());
96 for (
int j = 0; j < this->
dim_; j++ ) {
97 for (
int i = 0; i < this->
dim_; i++ ) {
102 (*eg)[j] = -prod/this->
fact_;
108 Teuchos::RCP<const std::vector<Real> > ex =
110 Teuchos::RCP<const std::vector<Real> > ev =
112 Teuchos::RCP<std::vector<Real> > ehv =
113 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(hv)).getVector());
116 for (
int l = 0; l < this->
dim_; l++ ) {
117 for (
int j = 0; j < this->
dim_; j++ ) {
119 for (
int i = 0; i < this->
dim_; i++ ) {
120 if ( j != i && l != i ) {
124 (*ehv)[l] += -prod/this->
fact_*(*ev)[j];
137 Teuchos::RCP<std::vector<Real> > x0p =
138 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x0)).getVector());
139 Teuchos::RCP<std::vector<Real> > xp =
140 Teuchos::rcp_const_cast<std::vector<Real> >((Teuchos::dyn_cast<
StdVector<Real> >(x)).getVector());
149 std::vector<Real> l(n,0.0);
150 std::vector<Real> u(n,0.0);
151 for (
int i = 0; i < n; i++ ) {
157 for (
int i = 0; i < n; i++ ) {
162 for (
int i = 0; i < n; i++ ) {
163 (*xp)[i] = (Real)(i+1);
Contains definitions for std::vector bound constraints.
Provides the interface to evaluate objective functions.
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.
Provides the std::vector implementation of the ROL::Vector interface.
void getHS45(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Vector< Real > &x0, Vector< Real > &x)
Provides the interface to apply upper and lower bound constraints.
W. Hock and K. Schittkowski 45th test function.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Objective_HS45(int dim=5)