65 template<
class ScalarT>
83 template<
class ScalarT>
88 ROL::Ptr<const std::vector<ScalarT> > xp = (
dynamic_cast<const StdVector<ScalarT>&
>(x)).getVector();
97 for(
int i=0; i<n; ++i) {
98 xdotx += pow((*xp)[i],2);
99 kdotx += Real(i+1)*(*xp)[i];
103 J = xdotx + pow(kdotx,2)/4.0 + pow(kdotx,4)/16.0;
ROL::Objective_SimOpt value
Defines the linear algebra or vector space interface.
Provides the ROL::Vector interface for scalar values, to be used, for example, with scalar constraint...
ScalarT value(const Vector< ScalarT > &x, Real &tol)
A Sacado-accessible version of the Zakharov function to differentiate Where .