73 typedef typename vector::size_type
uint;
80 using Teuchos::dyn_cast;
85 using Teuchos::dyn_cast;
104 return 2.0 - prod/
fact_;
119 (*eg)[j] = -prod/
fact_;
137 if ( j != i && l != i ) {
141 (*ehv)[l] += -prod/
fact_*(*ev)[j];
159 Teuchos::RCP<std::vector<Real> > x0p = Teuchos::rcp(
new std::vector<Real>(n,0.0));
160 for (
int i = 0; i < n; i++ ) {
166 Teuchos::RCP<std::vector<Real> > xp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
167 for (
int i = 0; i < n; i++ ) {
168 (*xp)[i] = (Real)(i+1);
176 Teuchos::RCP<std::vector<Real> > lp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
177 Teuchos::RCP<std::vector<Real> > up = Teuchos::rcp(
new std::vector<Real>(n,0.0));
178 for (
int i = 0; i < n; i++ ) {
180 (*up)[i] =
static_cast<Real
>(i+1);
Provides the interface to evaluate objective functions.
Teuchos::RCP< const vector > getVector(const V &x)
std::vector< Real > 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.
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
Provides the interface to apply upper and lower bound constraints.
W. Hock and K. Schittkowski 45th test function.
void getHS45(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Teuchos::RCP< Vector< Real > > &x0, Teuchos::RCP< Vector< Real > > &x)
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Teuchos::RCP< vector > getVector(V &x)
Objective_HS45(int dim=5)