traditional_convergence_test Class Template Reference

Traditional LBFGS convergence test. More...

#include <lbfgs.h>

List of all members.

Public Member Functions

 traditional_convergence_test ()
 Default constructor.
 traditional_convergence_test (SizeType n, FloatType eps=FloatType(1.e-5))
 Constructor.
SizeType n () const
 Number of free parameters (as passed to the constructor).
FloatType eps () const
 Accuracy with which the solution is to be found (as passed to the constructor).
bool operator() (const FloatType *x, const FloatType *g) const
 Execution of the convergence test for the given parameters.


Detailed Description

template<typename FloatType, typename SizeType = std::size_t>
class scitbx::lbfgs::traditional_convergence_test< FloatType, SizeType >

Traditional LBFGS convergence test.

This convergence test is equivalent to the test embedded in the lbfgs.f Fortran code. The test assumes that there is a meaningful relation between the Euclidean norm of the parameter vector x and the norm of the gradient vector g. Therefore this test should not be used if this assumption is not correct for a given problem.


Constructor & Destructor Documentation

traditional_convergence_test ( SizeType  n,
FloatType  eps = FloatType(1.e-5) 
) [inline, explicit]

Constructor.

Parameters:
n The number of variables in the minimization problem. Restriction: n > 0.
eps Determines the accuracy with which the solution is to be found.


Member Function Documentation

bool operator() ( const FloatType *  x,
const FloatType *  g 
) const [inline]

Execution of the convergence test for the given parameters.

Returns true if

            ||g|| < eps * max(1,||x||),
          
where ||.|| denotes the Euclidean norm.

Parameters:
x Current solution vector.
g Components of the gradient at the current point x.


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

Generated on Tue Sep 1 17:12:36 2009 for cctbx by  doxygen 1.5.6