#include <lbfgs.h>
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. | |
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.
| traditional_convergence_test | ( | SizeType | n, | |
| FloatType | eps = FloatType(1.e-5) | |||
| ) | [inline, explicit] |
Constructor.
| n | The number of variables in the minimization problem. Restriction: n > 0. | |
| eps | Determines the accuracy with which the solution is to be found. |
| 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.
| x | Current solution vector. | |
| g | Components of the gradient at the current point x. |
1.5.6