ROL
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ROL::TypeP::Algorithm< Real > Class Template Referenceabstract

Provides an interface to run optimization algorithms to minimize composite optimization problems f+phi. More...

#include <ROL_TypeP_Algorithm.hpp>

+ Inheritance diagram for ROL::TypeP::Algorithm< Real >:

Public Member Functions

virtual ~Algorithm ()
 
 Algorithm ()
 Constructor, given a step and a status test.
 
void setStatusTest (const Ptr< StatusTest< Real > > &status, bool combineStatus=false)
 
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 run (Vector< Real > &x, Objective< Real > &sobj, Objective< Real > &nobj, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface.
 
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 optimization vector spaces, where the user does not define the dual() method.
 
virtual void writeHeader (std::ostream &os) const
 Print iterate header.
 
virtual void writeName (std::ostream &os) const
 Print step name.
 
virtual void writeOutput (std::ostream &os, bool write_header=false) const
 Print iterate status.
 
virtual void writeExitStatus (std::ostream &os) const
 
Ptr< const AlgorithmState< Real > > getState () const
 
void reset ()
 

Protected Member Functions

void initialize (const Vector< Real > &x, const Vector< Real > &g)
 
void pgstep (Vector< Real > &pgiter, Vector< Real > &pgstep, Objective< Real > &nobj, const Vector< Real > &x, const Vector< Real > &dg, Real t, Real &tol) const
 

Protected Attributes

const Ptr< CombinedStatusTest< Real > > status_
 
const Ptr< AlgorithmState< Real > > state_
 

Detailed Description

template<typename Real>
class ROL::TypeP::Algorithm< Real >

Provides an interface to run optimization algorithms to minimize composite optimization problems f+phi.

Definition at line 56 of file ROL_TypeP_Algorithm.hpp.

Constructor & Destructor Documentation

◆ ~Algorithm()

template<typename Real >
virtual ROL::TypeP::Algorithm< Real >::~Algorithm ( )
inlinevirtual

Definition at line 72 of file ROL_TypeP_Algorithm.hpp.

◆ Algorithm()

template<typename Real >
ROL::TypeP::Algorithm< Real >::Algorithm ( )

Constructor, given a step and a status test.

Definition at line 20 of file ROL_TypeP_Algorithm_Def.hpp.

References ROL::TypeP::Algorithm< Real >::status_.

Member Function Documentation

◆ initialize()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::initialize ( const Vector< Real > &  x,
const Vector< Real > &  g 
)
protected

◆ pgstep()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::pgstep ( Vector< Real > &  pgiter,
Vector< Real > &  pgstep,
Objective< Real > &  nobj,
const Vector< Real > &  x,
const Vector< Real > &  dg,
Real  t,
Real &  tol 
) const
protected

◆ setStatusTest()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::setStatusTest ( const Ptr< StatusTest< Real > > &  status,
bool  combineStatus = false 
)

Definition at line 62 of file ROL_TypeP_Algorithm_Def.hpp.

◆ run() [1/3]

template<typename Real >
void ROL::TypeP::Algorithm< Real >::run ( Problem< Real > &  problem,
std::ostream &  outStream = std::cout 
)
virtual

◆ run() [2/3]

template<typename Real >
void ROL::TypeP::Algorithm< Real >::run ( Vector< Real > &  x,
Objective< Real > &  sobj,
Objective< Real > &  nobj,
std::ostream &  outStream = std::cout 
)
virtual

Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface.

Definition at line 86 of file ROL_TypeP_Algorithm_Def.hpp.

References ROL::Vector< Real >::dual(), and ROL::TypeP::Algorithm< Real >::run().

Referenced by ROL::TypeP::Algorithm< Real >::run().

◆ run() [3/3]

template<typename Real >
virtual void ROL::TypeP::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  sobj,
Objective< Real > &  nobj,
std::ostream &  outStream = std::cout 
)
pure virtual

Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.

Implemented in ROL::TypeP::InexactNewtonAlgorithm< Real >, ROL::TypeP::iPianoAlgorithm< Real >, ROL::TypeP::ProxGradientAlgorithm< Real >, ROL::TypeP::QuasiNewtonAlgorithm< Real >, ROL::TypeP::SpectralGradientAlgorithm< Real >, and ROL::TypeP::TrustRegionAlgorithm< Real >.

◆ writeHeader()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::writeHeader ( std::ostream &  os) const
virtual

◆ writeName()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::writeName ( std::ostream &  os) const
virtual

◆ writeOutput()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::writeOutput ( std::ostream &  os,
bool  write_header = false 
) const
virtual

◆ writeExitStatus()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::writeExitStatus ( std::ostream &  os) const
virtual

◆ getState()

template<typename Real >
Ptr< const AlgorithmState< Real > > ROL::TypeP::Algorithm< Real >::getState ( ) const

Definition at line 149 of file ROL_TypeP_Algorithm_Def.hpp.

◆ reset()

template<typename Real >
void ROL::TypeP::Algorithm< Real >::reset ( )

Member Data Documentation

◆ status_

template<typename Real >
const Ptr<CombinedStatusTest<Real> > ROL::TypeP::Algorithm< Real >::status_
protected

◆ state_

template<typename Real >
const Ptr<AlgorithmState<Real> > ROL::TypeP::Algorithm< Real >::state_
protected

Definition at line 59 of file ROL_TypeP_Algorithm.hpp.


The documentation for this class was generated from the following files: