53 #ifndef ROL_SUMOFSQUARES_HPP 54 #define ROL_SUMOFSQUARES_HPP 92 typedef std::vector<Real> vector;
95 typedef typename vector::size_type uint;
98 using Teuchos::dyn_cast;
101 RCP<vector> x0p = dyn_cast<SV>(x0).getVector();
102 RCP<vector> xp = dyn_cast<SV>(x).getVector();
112 for ( uint i=0; i<n; i++) {
116 for( uint i=0; i<n; i++ ) {
Provides the interface to evaluate objective functions.
virtual void scale(const Real alpha)=0
Compute where .
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
void getSumOfSquares(Teuchos::RCP< Objective< Real > > &obj, Vector< Real > &x0, Vector< Real > &x)
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
Provides the std::vector implementation of the ROL::Vector interface.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
virtual void set(const Vector &x)
Set where .
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.