65 template<
class ScalarT>
83 template<
class ScalarT>
86 using Teuchos::RCP;
using Teuchos::dyn_cast;
88 RCP<const std::vector<ScalarT> > xp = (dyn_cast<
const StdVector<ScalarT> >(x)).getVector();
97 for(
int i=0; i<n; ++i) {
98 xdotx += pow((*xp)[i],2);
99 kdotx += double(i+1)*(*xp)[i];
103 J = xdotx + pow(kdotx,2)/4.0 + pow(kdotx,4)/16.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)
A Sacado-accessible version of the Zakharov function to differentiate Where .