55 template<
class ScalarT>
61 template <
class ScalarT>
63 Teuchos::RCP<const std::vector<ScalarT> > xp =
66 ScalarT x1 = (*xp)[0];
67 ScalarT x2 = (*xp)[1];
68 ScalarT x3 = (*xp)[2];
69 ScalarT x4 = (*xp)[3];
70 ScalarT x5 = (*xp)[4];
72 ScalarT J = exp(x1*x2*x3*x4*x5) - 0.5 * pow( (pow(x1,3)+pow(x2,3)+1.0), 2);
84 class Example_Constraint {
88 template<
class ScalarT>
94 template<
class ScalarT>
96 Teuchos::RCP<std::vector<ScalarT> > cp =
97 Teuchos::rcp_const_cast<std::vector<ScalarT> >((Teuchos::dyn_cast<
StdVector<ScalarT> >(c)).getVector());
98 Teuchos::RCP<const std::vector<ScalarT> > xp =
101 ScalarT x1 = (*xp)[0];
102 ScalarT x2 = (*xp)[1];
103 ScalarT x3 = (*xp)[2];
104 ScalarT x4 = (*xp)[3];
105 ScalarT x5 = (*xp)[4];
107 (*cp)[0] = x1*x1+x2*x2+x3*x3+x4*x4+x5*x5 - 10.0;
108 (*cp)[1] = x2*x3 - 5.0*x4*x5;
109 (*cp)[2] = x1*x1*x1 + x2*x2*x2 + 1.0;
Defines the linear algebra or vector space interface.
Provides the std::vector implementation of the ROL::Vector interface.
ScalarT value(const Vector< ScalarT > &x, Real &tol)