Commit 1029c489 by Francois Gygi

Keep previous value of alpha in next line search


git-svn-id: http://qboxcode.org/svn/qb/trunk@1708 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 70f8bdf7
......@@ -156,6 +156,12 @@ void CGOptimizer::compute_xp(const valarray<double>& x, const double f,
fp0_ = fp;
}
// set the starting alpha of the minimizer to be the current alpha_
if ( alpha_ < linmin_.alpha_max() )
linmin_.set_alpha_start(alpha_);
else
linmin_.set_alpha_start(0.5*linmin_.alpha_max());
// reset the line minimizer
linmin_.reset();
alpha_ = linmin_.next_alpha(alpha_,f,fp);
......
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