31 template<
class ScalarT>
49 template<
class ScalarT>
54 ROL::Ptr<const std::vector<ScalarT> > xp = (
dynamic_cast<const StdVector<ScalarT>&
>(x)).getVector();
63 for(
int i=0; i<n; ++i) {
64 xdotx += pow((*xp)[i],2);
65 kdotx += Real(i+1)*(*xp)[i];
69 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 .