10#ifndef ROL_TYPEP_ALGORITHM_H
11#define ROL_TYPEP_ALGORITHM_H
15#include "ROL_Problem.hpp"
24template<
typename Real>
55template<
typename Real>
58 const Ptr<CombinedStatusTest<Real>>
status_;
59 const Ptr<AlgorithmState<Real>>
state_;
79 bool combineStatus =
false);
85 std::ostream &outStream = std::cout );
93 std::ostream &outStream = std::cout );
103 std::ostream &outStream = std::cout) = 0;
107 virtual void writeHeader( std::ostream& os )
const;
111 virtual void writeName( std::ostream& os )
const;
115 virtual void writeOutput( std::ostream& os,
bool write_header =
false )
const;
120 Ptr<const AlgorithmState<Real>>
getState()
const;
Provides the interface to evaluate objective functions.
Provides an interface to check status of optimization algorithms.
Provides an interface to run optimization algorithms to minimize composite optimization problems f+ph...
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