ROL
Public Member Functions | Private Attributes | List of all members
ROL::Algorithm< Real > Class Template Reference

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

#include <ROL_Algorithm.hpp>

Public Member Functions

virtual ~Algorithm ()
 
 Algorithm (const ROL::Ptr< Step< Real > > &step, const ROL::Ptr< StatusTest< Real > > &status, bool printHeader=false)
 Constructor, given a step and a status test. More...
 
 Algorithm (const ROL::Ptr< Step< Real > > &step, const ROL::Ptr< StatusTest< Real > > &status, const ROL::Ptr< AlgorithmState< Real > > &state, bool printHeader=false)
 Constructor, given a step, a status test, and a previously defined algorithm state. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, Objective< Real > &obj, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 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. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on bound constrained problems (Type-B). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on equality constrained problems (Type-E). This is the primary Type-E interface. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on equality constrained problems (Type-E). This general interface supports the use of dual optimization and constraint vector spaces, where the user does not define the dual() method. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on equality and bound constrained problems (Type-EB). This is the primary Type-EB interface. More...
 
virtual std::vector< std::string > run (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, bool print=false, std::ostream &outStream=std::cout, bool printVectors=false, std::ostream &vectorStream=std::cout)
 Run algorithm on equality and bound constrained problems (Type-EB). This general interface supports the use of dual optimization and constraint vector spaces, where the user does not define the dual() method. More...
 
std::string getIterHeader (void)
 
std::string getIterInfo (bool withHeader=false)
 
ROL::Ptr< const AlgorithmState
< Real > > 
getState (void) const
 
void reset (void)
 

Private Attributes

ROL::Ptr< Step< Real > > step_
 
ROL::Ptr< StatusTest< Real > > status_
 
ROL::Ptr< AlgorithmState< Real > > state_
 
bool printHeader_
 

Detailed Description

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

Provides an interface to run optimization algorithms.

Provides an interface to run unconstrained optimization algorithms.

Definition at line 63 of file ROL_Algorithm.hpp.

Constructor & Destructor Documentation

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

Definition at line 73 of file ROL_Algorithm.hpp.

template<class Real>
ROL::Algorithm< Real >::Algorithm ( const ROL::Ptr< Step< Real > > &  step,
const ROL::Ptr< StatusTest< Real > > &  status,
bool  printHeader = false 
)
inline

Constructor, given a step and a status test.

Definition at line 77 of file ROL_Algorithm.hpp.

References ROL::Algorithm< Real >::printHeader_, ROL::Algorithm< Real >::state_, ROL::Algorithm< Real >::status_, and ROL::Algorithm< Real >::step_.

template<class Real>
ROL::Algorithm< Real >::Algorithm ( const ROL::Ptr< Step< Real > > &  step,
const ROL::Ptr< StatusTest< Real > > &  status,
const ROL::Ptr< AlgorithmState< Real > > &  state,
bool  printHeader = false 
)
inline

Constructor, given a step, a status test, and a previously defined algorithm state.

Definition at line 89 of file ROL_Algorithm.hpp.

References ROL::Algorithm< Real >::printHeader_, ROL::Algorithm< Real >::state_, ROL::Algorithm< Real >::status_, and ROL::Algorithm< Real >::step_.

Member Function Documentation

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
Objective< Real > &  obj,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

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

Definition at line 102 of file ROL_Algorithm.hpp.

References ROL::BoundConstraint< Real >::deactivate(), and ROL::Vector< Real >::dual().

Referenced by main(), and ROL::Algorithm< Real >::run().

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

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.

Definition at line 117 of file ROL_Algorithm.hpp.

References ROL::BoundConstraint< Real >::deactivate(), and ROL::Algorithm< Real >::run().

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface.

Definition at line 132 of file ROL_Algorithm.hpp.

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

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

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

Definition at line 146 of file ROL_Algorithm.hpp.

References ROL::Vector< Real >::clone(), ROL::EExitStatusToString(), ROL::Vector< Real >::print(), ROL::Algorithm< Real >::printHeader_, ROL::Algorithm< Real >::state_, ROL::Algorithm< Real >::status_, and ROL::Algorithm< Real >::step_.

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
Vector< Real > &  l,
Objective< Real > &  obj,
Constraint< Real > &  con,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

Run algorithm on equality constrained problems (Type-E). This is the primary Type-E interface.

Definition at line 220 of file ROL_Algorithm.hpp.

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

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Vector< Real > &  l,
const Vector< Real > &  c,
Objective< Real > &  obj,
Constraint< Real > &  con,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

Run algorithm on equality constrained problems (Type-E). This general interface supports the use of dual optimization and constraint vector spaces, where the user does not define the dual() method.

Definition at line 238 of file ROL_Algorithm.hpp.

References ROL::Vector< Real >::clone(), ROL::EExitStatusToString(), ROL::Vector< Real >::print(), ROL::Algorithm< Real >::printHeader_, ROL::Algorithm< Real >::state_, ROL::Algorithm< Real >::status_, and ROL::Algorithm< Real >::step_.

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
Vector< Real > &  l,
Objective< Real > &  obj,
Constraint< Real > &  con,
BoundConstraint< Real > &  bnd,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

Run algorithm on equality and bound constrained problems (Type-EB). This is the primary Type-EB interface.

Definition at line 312 of file ROL_Algorithm.hpp.

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

template<class Real>
virtual std::vector<std::string> ROL::Algorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Vector< Real > &  l,
const Vector< Real > &  c,
Objective< Real > &  obj,
Constraint< Real > &  con,
BoundConstraint< Real > &  bnd,
bool  print = false,
std::ostream &  outStream = std::cout,
bool  printVectors = false,
std::ostream &  vectorStream = std::cout 
)
inlinevirtual

Run algorithm on equality and bound constrained problems (Type-EB). This general interface supports the use of dual optimization and constraint vector spaces, where the user does not define the dual() method.

Definition at line 328 of file ROL_Algorithm.hpp.

References ROL::Vector< Real >::clone(), ROL::EExitStatusToString(), ROL::Vector< Real >::print(), ROL::Algorithm< Real >::printHeader_, ROL::Algorithm< Real >::state_, ROL::Algorithm< Real >::status_, and ROL::Algorithm< Real >::step_.

template<class Real>
std::string ROL::Algorithm< Real >::getIterHeader ( void  )
inline

Definition at line 398 of file ROL_Algorithm.hpp.

References ROL::Algorithm< Real >::step_.

template<class Real>
std::string ROL::Algorithm< Real >::getIterInfo ( bool  withHeader = false)
inline
template<class Real>
ROL::Ptr<const AlgorithmState<Real> > ROL::Algorithm< Real >::getState ( void  ) const
inline

Definition at line 406 of file ROL_Algorithm.hpp.

References ROL::Algorithm< Real >::state_.

template<class Real>
void ROL::Algorithm< Real >::reset ( void  )
inline

Definition at line 410 of file ROL_Algorithm.hpp.

References ROL::Algorithm< Real >::state_.

Member Data Documentation

template<class Real>
ROL::Ptr<Step<Real> > ROL::Algorithm< Real >::step_
private
template<class Real>
ROL::Ptr<StatusTest<Real> > ROL::Algorithm< Real >::status_
private
template<class Real>
ROL::Ptr<AlgorithmState<Real> > ROL::Algorithm< Real >::state_
private
template<class Real>
bool ROL::Algorithm< Real >::printHeader_
private

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