Open normvcr opened 11 years ago
Sorry this took so long. The patch you have sent is somewhat challenging to use as it got formatted into markdown, which I can potentially work around but brings up a different issue:
It's GPLv3. The project is currently licensed as MIT, and landing a GPL dependency effectively taints it - so unless you intend to relicense with a more permissive license, I'm afraid landing this would be problematic.
Here are two routines for the LBFGS project, to be incorporated as seen fit by the project maintainers.
-- Converts LBFGS error codes to short strings. -- Pretty-prints the LBFGS parameters
//*** // Copyright 2013 Norman J. Goldstein // // License: // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this program. If not, see // http://www.gnu.org/licenses/. // // Author: Norman J. Goldstein (ngoldstein@SystemSolutionsRD.com, // normvcr@telus.net)
include "MthConfigLBFGS.h"
include
const char* LBFGS_ERR_str( int val ) { switch( val ) { case LBFGS_CONVERGENCE: { return "CONVERGENCE"; }
} }
using namespace std;
ostream& operator<<( ostream& os, const lbfgs_parameter_t& params ) {
define POUT(v) os << #v << "= " << params.v << endl
POUT(m); POUT(epsilon); POUT(past); POUT(delta); POUT(max_iterations); POUT(linesearch); POUT(max_linesearch); POUT(min_step); POUT(max_step); POUT(ftol); POUT(wolfe); POUT(gtol); POUT(xtol); POUT(orthantwise_c); POUT(orthantwise_start); POUT(orthantwise_end);
undef POUT
return os; }// operator<<