44 #ifndef ROL_TYPEP_ALGORITHM_H
45 #define ROL_TYPEP_ALGORITHM_H
49 #include "ROL_Problem.hpp"
58 template<
typename Real>
89 template<
typename Real>
92 const Ptr<CombinedStatusTest<Real>>
status_;
93 const Ptr<AlgorithmState<Real>>
state_;
113 bool combineStatus =
false);
119 std::ostream &outStream = std::cout );
127 std::ostream &outStream = std::cout );
137 std::ostream &outStream = std::cout) = 0;
141 virtual void writeHeader( std::ostream& os )
const;
145 virtual void writeName( std::ostream& os )
const;
149 virtual void writeOutput( std::ostream& os,
bool write_header =
false )
const;
154 Ptr<const AlgorithmState<Real>>
getState()
const;
Provides the interface to evaluate objective functions.
virtual void writeOutput(std::ostream &os, bool write_header=false) const
Print iterate status.
void pgstep(Vector< Real > &pgiter, Vector< Real > &pgstep, Objective< Real > &nobj, const Vector< Real > &x, const Vector< Real > &dg, Real t, Real &tol) const
Ptr< Vector< Real > > stepVec
Defines the linear algebra or vector space interface.
void setStatusTest(const Ptr< StatusTest< Real >> &status, bool combineStatus=false)
State for algorithm class. Will be used for restarts.
virtual void writeHeader(std::ostream &os) const
Print iterate header.
virtual void writeName(std::ostream &os) const
Print step name.
const Ptr< AlgorithmState< Real > > state_
Provides an interface to check status of optimization algorithms.
const Ptr< CombinedStatusTest< Real > > status_
Provides an interface to run optimization algorithms to minimize composite optimization problems f+ph...
virtual void writeExitStatus(std::ostream &os) const
virtual void run(Problem< Real > &problem, std::ostream &outStream=std::cout)
Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface.
void initialize(const Vector< Real > &x, const Vector< Real > &g)
Ptr< Vector< Real > > gradientVec
Algorithm()
Constructor, given a step and a status test.
Ptr< const AlgorithmState< Real > > getState() const