From 84b30ae122cc95bc9c38c3ce1e36e342ec10c764 Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Thu, 22 Jun 2023 00:35:47 +0900 Subject: [PATCH] document that non-zero return value of a callback is used as return value of lbfgs() --- include/lbfgs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lbfgs.h b/include/lbfgs.h index 03207e7..dea9d8a 100644 --- a/include/lbfgs.h +++ b/include/lbfgs.h @@ -400,8 +400,9 @@ typedef lbfgsfloatval_t (*lbfgs_evaluate_t)( * @param n The number of variables. * @param k The iteration count. * @param ls The number of evaluations called for this iteration. - * @retval int Zero to continue the optimization process. Returning a - * non-zero value will cancel the optimization process. + * @retval int Zero (#LBFGS_SUCCESS) to continue the optimization process. + * Returning a non-zero value will cancel the optimization + * process and lbfgs() returns the value as its return value. */ typedef int (*lbfgs_progress_t)( void *instance,