From 05c4e811147997ae3ee05e457b7b15e7955b144e Mon Sep 17 00:00:00 2001 From: JWu <j.wuttke@fz-juelich.de> Date: Fri, 9 Aug 2013 17:39:33 +0200 Subject: [PATCH] ? --- pub/src/commands.cpp | 2 +- pub/src/fit.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pub/src/commands.cpp b/pub/src/commands.cpp index 871e2ad9..98908f0d 100644 --- a/pub/src/commands.cpp +++ b/pub/src/commands.cpp @@ -131,7 +131,7 @@ bool fridaCommand( string cmd ) " csf set gradient step factor\n" " cse set sqrt of differentiation step\n" " csc set number of calls\n" - " csp set print frequency\n" + " csv set verbosity\n" " csm set fit metric\n" " cst set maximum duration of fits\n" "Tuning parameters for integration:\n" diff --git a/pub/src/fit.cpp b/pub/src/fit.cpp index aec63bdc..6381308a 100644 --- a/pub/src/fit.cpp +++ b/pub/src/fit.cpp @@ -31,7 +31,7 @@ namespace NCurveFit { double Epsilon = 1.e-14; double Factor=100.; int nCall=200; - int nPrint=0; + int verbosity=0; int mFitMetric=2; double maxtime = 3; } @@ -41,11 +41,11 @@ namespace NCurveFit { void NCurveFit::setFitTuningPars( string which ) { if ( which=="?" ) - printf( "Fit setup:\n nCall=%d\n nPrint=%d\n Factor=%g\n" + printf( "Fit setup:\n nCall=%d\n Verbosity=%d\n Factor=%g\n" " Eps=%g\n Metric=%i\n", - nCall, nPrint, Factor, Epsilon, mFitMetric ); - else if ( which=="p" ) - nPrint = iask( "Print frequency", nPrint ); + nCall, verbosity, Factor, Epsilon, mFitMetric ); + else if ( which=="v" ) + verbosity = iask( "Verbosity", verbosity ); else if ( which=="c" ) nCall = iask( "Max no of Levenberg-Marquardt steps", nCall ); else if ( which=="f" ) @@ -207,11 +207,11 @@ void NCurveFit::fit( bool _allow_slow_conv ) data.fd = fd; int np = fc->nP; - - + control.epsilon = Epsilon; control.stepbound = Factor; control.patience = nCall; + control.verbosity = verbosity; for ( int j=0; j<fc->nJ(); j++ ) { if ( fc->V[j]->frozen ) @@ -242,7 +242,7 @@ void NCurveFit::fit( bool _allow_slow_conv ) Par[ipf++] = C->P[ip]; } - if ( nPrint ) printf("\n"); + if ( verbosity ) printf("\n"); // Levenberg-Marquardt routine from library lmfit: -- GitLab