diff --git a/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h b/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h index ed0eeb5d2..ee98300ab 100644 --- a/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h +++ b/unsupported/Eigen/src/NonLinear/HybridNonLinearSolver.h @@ -4,7 +4,7 @@ class HybridNonLinearSolver { public: HybridNonLinearSolver(FunctorType &_functor) - : functor(_functor) {} + : functor(_functor) { nfev=njev=iter = 0; fnorm= 0.; } enum Status { Running = -1, @@ -79,6 +79,7 @@ public: int nfev; int njev; int iter; + Scalar fnorm; private: FunctorType &functor; int n; @@ -89,7 +90,6 @@ private: bool jeval; int ncsuc; Scalar ratio; - Scalar fnorm; Scalar pnorm, xnorm, fnorm1; int nslow1, nslow2; int ncfail; diff --git a/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h b/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h index 27768a160..47576e733 100644 --- a/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h +++ b/unsupported/Eigen/src/NonLinear/LevenbergMarquardt.h @@ -4,7 +4,7 @@ class LevenbergMarquardt { public: LevenbergMarquardt(FunctorType &_functor) - : functor(_functor) {} + : functor(_functor) { nfev = njev = iter = 0; fnorm=gnorm = 0.; } enum Status { Running = -1, @@ -100,6 +100,7 @@ public: int nfev; int njev; int iter; + Scalar fnorm, gnorm; private: FunctorType &functor; int n; @@ -110,7 +111,6 @@ private: Scalar temp, temp1, temp2; Scalar delta; Scalar ratio; - Scalar fnorm, gnorm; Scalar pnorm, xnorm, fnorm1, actred, dirder, prered; };