44#ifndef ROL_TYPEP_ALGORITHM_H
45#define ROL_TYPEP_ALGORITHM_H
49#include "ROL_Problem.hpp"
58template<
typename Real>
89template<
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.
Provides an interface to check status of optimization algorithms.
void pgstep(Vector< Real > &pgiter, Vector< Real > &pgstep, Objective< Real > &nobj, const Vector< Real > &x, const Vector< Real > &dg, Real t, Real &tol) 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.
virtual void writeName(std::ostream &os) const
Print step name.
Ptr< const AlgorithmState< Real > > getState() const
const Ptr< AlgorithmState< Real > > state_
Algorithm()
Constructor, given a step and a status test.
virtual void writeHeader(std::ostream &os) const
Print iterate header.
virtual void writeExitStatus(std::ostream &os) const
virtual void writeOutput(std::ostream &os, bool write_header=false) const
Print iterate status.
const Ptr< CombinedStatusTest< Real > > status_
void setStatusTest(const Ptr< StatusTest< Real > > &status, bool combineStatus=false)
virtual void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &sobj, Objective< Real > &nobj, std::ostream &outStream=std::cout)=0
Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual opt...
void initialize(const Vector< Real > &x, const Vector< Real > &g)
Defines the linear algebra or vector space interface.
State for algorithm class. Will be used for restarts.
Ptr< Vector< Real > > gradientVec
Ptr< Vector< Real > > stepVec