ROL
ROL::Brents< Real > Class Template Reference

Implements a Brent's method line search. More...

#include <ROL_Brents.hpp>

Inheritance diagram for ROL::Brents< Real >:

Classes

class  testFunction

Public Member Functions

virtual ~Brents ()
 Brents (ROL::ParameterList &parlist)
void initialize (const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con)
void run (Real &alpha, Real &fval, int &ls_neval, int &ls_ngrad, const Real &gs, const Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &con)
Public Member Functions inherited from ROL::LineSearch< Real >
virtual ~LineSearch ()
 LineSearch (ROL::ParameterList &parlist)
void setData (Real &eps, const Vector< Real > &g)
void setMaxitUpdate (Real &alpha, Real &fnew, const Real &fold)

Private Member Functions

void run_brents (int &neval, Real &fval, Real &alpha, typename LineSearch< Real >::ScalarFunction &phi, const Real A, const Real B) const
bool test_brents (void) const

Private Attributes

Real tol_
int niter_
bool test_
ROL::Ptr< Vector< Real > > xnew_

Additional Inherited Members

Protected Member Functions inherited from ROL::LineSearch< Real >
virtual bool status (const ELineSearch type, int &ls_neval, int &ls_ngrad, const Real alpha, const Real fold, const Real sgold, const Real fnew, const Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con)
virtual Real getInitialAlpha (int &ls_neval, int &ls_ngrad, const Real fval, const Real gs, const Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con)
void setNextInitialAlpha (Real alpha)
void updateIterate (Vector< Real > &xnew, const Vector< Real > &x, const Vector< Real > &s, Real alpha, BoundConstraint< Real > &con)
bool useLocalMinimizer ()
bool takeNoStep ()

Detailed Description

template<class Real>
class ROL::Brents< Real >

Implements a Brent's method line search.

Definition at line 23 of file ROL_Brents.hpp.

Constructor & Destructor Documentation

◆ ~Brents()

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

Definition at line 34 of file ROL_Brents.hpp.

◆ Brents()

template<class Real>
ROL::Brents< Real >::Brents ( ROL::ParameterList & parlist)
inline

Definition at line 37 of file ROL_Brents.hpp.

References ROL::LineSearch< Real >::LineSearch(), niter_, test_, and tol_.

Member Function Documentation

◆ initialize()

template<class Real>
void ROL::Brents< Real >::initialize ( const Vector< Real > & x,
const Vector< Real > & s,
const Vector< Real > & g,
Objective< Real > & obj,
BoundConstraint< Real > & con )
inlinevirtual

◆ run()

template<class Real>
void ROL::Brents< Real >::run ( Real & alpha,
Real & fval,
int & ls_neval,
int & ls_ngrad,
const Real & gs,
const Vector< Real > & s,
const Vector< Real > & x,
Objective< Real > & obj,
BoundConstraint< Real > & con )
inlinevirtual

◆ run_brents()

template<class Real>
void ROL::Brents< Real >::run_brents ( int & neval,
Real & fval,
Real & alpha,
typename LineSearch< Real >::ScalarFunction & phi,
const Real A,
const Real B ) const
inlineprivate

Definition at line 84 of file ROL_Brents.hpp.

References niter_, ROL::ROL_EPSILON(), tol_, and zero.

Referenced by run(), and test_brents().

◆ test_brents()

template<class Real>
bool ROL::Brents< Real >::test_brents ( void ) const
inlineprivate

Definition at line 176 of file ROL_Brents.hpp.

References ROL::ROL_EPSILON(), run_brents(), tol_, and zero.

Referenced by initialize().

Member Data Documentation

◆ tol_

template<class Real>
Real ROL::Brents< Real >::tol_
private

Definition at line 25 of file ROL_Brents.hpp.

Referenced by Brents(), run_brents(), and test_brents().

◆ niter_

template<class Real>
int ROL::Brents< Real >::niter_
private

Definition at line 26 of file ROL_Brents.hpp.

Referenced by Brents(), and run_brents().

◆ test_

template<class Real>
bool ROL::Brents< Real >::test_
private

Definition at line 27 of file ROL_Brents.hpp.

Referenced by Brents(), and initialize().

◆ xnew_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::Brents< Real >::xnew_
private

Definition at line 29 of file ROL_Brents.hpp.

Referenced by initialize(), and run().


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