Tanl Linguistic Pipeline |
00001 /* 00002 ** DeSR 00003 ** MaxEntropy/model/lbfgsAlg.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2005 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of DeSR. 00009 ** 00010 ** DeSR is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** DeSR is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00056 #ifndef DeSR_lbfgsAlg_H 00057 #define DeSR_lbfgsAlg_H 00058 00059 namespace LBFGS { 00060 00069 static double gtol = 0.9; 00070 00078 static double stpmin = 1e-20; 00079 00087 static double stpmax = 1e20; 00088 00225 void minimize(int n, int m, double* x, double f, double* g, 00226 bool diagco, double* diag, int* iprint, double eps, 00227 double xtol, double* w, int& iflag, int& niter, int& nfun); 00228 00325 void mcsrch(int n, double* x, double f, double* g, double* s, 00326 double& stp, const double ftol, const double xtol, 00327 const int maxfev, int& info, int& nfev, double* wa); 00328 00329 } // namespace LBFGS 00330 00331 #endif // DeSR_lbfgsAlg_H