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

Provides an interface to run unconstrained optimization algorithms. More...

#include <ROL_TypeU_Algorithm.hpp>

+ Inheritance diagram for ROL::TypeU::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 > &obj, 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 > &obj, Constraint< Real > &linear_con, Vector< Real > &linear_mul, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems with explicit linear equality constraints (Type-U). This is the primary Type-U with explicit linear equality constraints interface.
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, Constraint< Real > &linear_con, Vector< Real > &linear_mul, const Vector< Real > &linear_c, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems with explicit linear equality constraints (Type-U). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, 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)
 

Protected Attributes

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

Detailed Description

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

Provides an interface to run unconstrained optimization algorithms.

Definition at line 83 of file ROL_TypeU_Algorithm.hpp.

Constructor & Destructor Documentation

◆ ~Algorithm()

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

Definition at line 92 of file ROL_TypeU_Algorithm.hpp.

◆ Algorithm()

template<typename Real >
ROL::TypeU::Algorithm< Real >::Algorithm

Constructor, given a step and a status test.

Definition at line 55 of file ROL_TypeU_Algorithm_Def.hpp.

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

Member Function Documentation

◆ initialize()

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

◆ setStatusTest()

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

Definition at line 85 of file ROL_TypeU_Algorithm_Def.hpp.

◆ run() [1/5]

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

◆ run() [2/5]

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

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

Definition at line 109 of file ROL_TypeU_Algorithm_Def.hpp.

References ROL::Vector< Real >::dual().

◆ run() [3/5]

template<typename Real >
void ROL::TypeU::Algorithm< Real >::run ( Vector< Real > &  x,
Objective< Real > &  obj,
Constraint< Real > &  linear_con,
Vector< Real > &  linear_mul,
std::ostream &  outStream = std::cout 
)
virtual

Run algorithm on unconstrained problems with explicit linear equality constraints (Type-U). This is the primary Type-U with explicit linear equality constraints interface.

Definition at line 116 of file ROL_TypeU_Algorithm_Def.hpp.

References ROL::Vector< Real >::dual().

◆ run() [4/5]

template<typename Real >
void ROL::TypeU::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
Constraint< Real > &  linear_con,
Vector< Real > &  linear_mul,
const Vector< Real > &  linear_c,
std::ostream &  outStream = std::cout 
)
virtual

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

Definition at line 125 of file ROL_TypeU_Algorithm_Def.hpp.

References ROL::Vector< Real >::clone(), ROL::ReduceLinearConstraint< Real >::getFeasibleVector(), ROL::Vector< Real >::plus(), ROL::ReduceLinearConstraint< Real >::project(), and ROL::ReduceLinearConstraint< Real >::transform().

◆ run() [5/5]

template<typename Real >
virtual void ROL::TypeU::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
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::TypeU::BundleAlgorithm< Real >, ROL::TypeU::LineSearchAlgorithm< Real >, and ROL::TypeU::TrustRegionAlgorithm< Real >.

◆ writeHeader()

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

◆ writeName()

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

◆ writeOutput()

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

◆ writeExitStatus()

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

◆ getState()

template<typename Real >
Ptr< const AlgorithmState< Real > > ROL::TypeU::Algorithm< Real >::getState

Definition at line 196 of file ROL_TypeU_Algorithm_Def.hpp.

◆ reset()

template<typename Real >
void ROL::TypeU::Algorithm< Real >::reset

Definition at line 201 of file ROL_TypeU_Algorithm_Def.hpp.

Member Data Documentation

◆ status_

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

◆ state_

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

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