Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug and optimize code in TRON::tron
Variable "iter" and "w" won't change in the while loop of function TRON::tron when the direction does not lead to sufficient function-value decrease, so using expression "iter == 1" as a flag to initialize variables will cause problems in the first step. We introduce a new variable "delta_adjusted" to fix the bug. The function call "fun_obj->get_diagH(M)" and the calculation of "(1-alpha_pcg) I + alpha_pcg M" can be saved if "iter" and "w" remains the same. We move some lines of code to save the calculation.
- Loading branch information