10 #ifndef ROL_QUASINEWTON_U_H
11 #define ROL_QUASINEWTON_U_H
26 template<
typename Real>
49 if ( secant == nullPtr ) {
50 secantName_ = parlist.sublist(
"General").sublist(
"Secant").get(
"Type",
"Limited-Memory BFGS");
52 secant_ = SecantFactory<Real>(parlist);
55 secantName_ = parlist.sublist(
"General").sublist(
"Secant").get(
"User Defined Secant Name",
56 "Unspecified User Defined Secant Method");
65 if (sdotg >= static_cast<Real>(0)) {
70 s.
scale(static_cast<Real>(-1));
78 const Real snorm,
const int iter)
override {
80 secant_->updateStorage(x,gnew,gold,s,snorm,iter+1);
84 std::stringstream name;
Provides the interface to evaluate objective functions.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual void scale(const Real alpha)=0
Compute where .
virtual Real apply(const Vector< Real > &x) const
Apply to a dual vector. This is equivalent to the call .
std::string secantName_
Secant name.
Contains definitions of custom data types in ROL.
ESecant esec_
Secant type.
ESecant StringToESecant(std::string s)
Defines the linear algebra or vector space interface.
Ptr< Secant< Real > > secant_
Secant object (used for quasi-Newton)
void compute(Vector< Real > &s, Real &snorm, Real &sdotg, int &iter, int &flag, const Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj) override
ESecant
Enumeration of secant update algorithms.
std::string printName(void) const override
QuasiNewton_U(ParameterList &parlist, const Ptr< Secant< Real >> &secant=nullPtr)
Constructor.
Provides interface for and implements limited-memory secant operators.
virtual void set(const Vector &x)
Set where .
virtual Real norm() const =0
Returns where .
Provides the interface to compute unconstrained optimization steps for line search.
void update(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &gold, const Vector< Real > &gnew, const Real snorm, const int iter) override
Provides the interface to compute optimization steps with a secant method.