Commit a59d78b8 by Francois Gygi

fixed return value when line search fails

git-svn-id: http://qboxcode.org/svn/qb/trunk@976 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 9a60da23
......@@ -81,7 +81,7 @@ void CGOptimizer::compute_xp(const valarray<double>& x, const double f,
{
// line minimization failed
if ( debug_print )
cout << "CGOptimizer: line minimization failed" << endl;
cout << " CGOptimizer: line minimization failed" << endl;
// restart from current point
p_ = -g;
......@@ -105,6 +105,7 @@ void CGOptimizer::compute_xp(const valarray<double>& x, const double f,
xp = x0_ + alpha_ * p_;
first_step_ = false;
return;
}
if ( linmin_.done() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment