From c1be96967e2cf6fc95a1e17d3381ef0c1d62e533 Mon Sep 17 00:00:00 2001 From: Thomas Capricelli Date: Wed, 26 Aug 2009 01:09:23 +0200 Subject: [PATCH] remove printfs, they are of no use and may prevent compilation --- .../Eigen/src/NonLinear/HybridNonLinearSolver.h | 8 ++------ unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h | 12 +++--------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h b/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h index 494d7463f..5e5204ed7 100644 --- a/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h +++ b/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h @@ -114,10 +114,8 @@ HybridNonLinearSolver::solve( Parameters parameters; /* check the input parameters for errors. */ - if (n <= 0 || tol < 0.) { - printf("HybridNonLinearSolver::solve() bad args : n,tol,..."); + if (n <= 0 || tol < 0.) return ImproperInputParameters; - } parameters.maxfev = 100*(n+1); parameters.xtol = tol; @@ -429,10 +427,8 @@ HybridNonLinearSolver::solveNumericalDiff( Parameters parameters; /* check the input parameters for errors. */ - if (n <= 0 || tol < 0.) { - printf("HybridNonLinearSolver::solve() bad args : n,tol,..."); + if (n <= 0 || tol < 0.) return ImproperInputParameters; - } parameters.maxfev = 200*(n+1); parameters.xtol = tol; diff --git a/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h b/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h index 086dd3fbf..bb164bcba 100644 --- a/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h +++ b/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h @@ -133,10 +133,8 @@ LevenbergMarquardt::minimize( Parameters parameters; /* check the input parameters for errors. */ - if (n <= 0 || m < n || tol < 0.) { - printf("LevenbergMarquardt::minimize() bad args : m,n,tol,..."); + if (n <= 0 || m < n || tol < 0.) return ImproperInputParameters; - } parameters.ftol = tol; parameters.xtol = tol; @@ -420,10 +418,8 @@ LevenbergMarquardt::minimizeNumericalDiff( Parameters parameters; /* check the input parameters for errors. */ - if (n <= 0 || m < n || tol < 0.) { - printf("ei_lmder1 bad args : m,n,tol,..."); + if (n <= 0 || m < n || tol < 0.) return ImproperInputParameters; - } parameters.ftol = tol; parameters.xtol = tol; @@ -708,10 +704,8 @@ LevenbergMarquardt::minimizeOptimumStorage( Parameters parameters; /* check the input parameters for errors. */ - if (n <= 0 || m < n || tol < 0.) { - printf("LevenbergMarquardtOptimumStorage::minimize() bad args : m,n,tol,..."); + if (n <= 0 || m < n || tol < 0.) return ImproperInputParameters; - } parameters.ftol = tol; parameters.xtol = tol;