Merge branch 'master' of github.com:nlesc-dirac/sagecal
This commit is contained in:
commit
388aa34148
|
@ -677,6 +677,14 @@ linesearch(
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("mu=%lf, alpha1=%lf\n",mu,alpha1);
|
printf("mu=%lf, alpha1=%lf\n",mu,alpha1);
|
||||||
#endif
|
#endif
|
||||||
|
/* catch if not finite (deltaphi=0 or nan) */
|
||||||
|
if (!isnormal(mu)) {
|
||||||
|
free(xp);
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("line interval too small\n");
|
||||||
|
#endif
|
||||||
|
return mu;
|
||||||
|
}
|
||||||
|
|
||||||
ci=1;
|
ci=1;
|
||||||
alphai=alpha1; /* initial value for alpha(i) : check if 0<alphai<=mu */
|
alphai=alpha1; /* initial value for alpha(i) : check if 0<alphai<=mu */
|
||||||
|
@ -852,7 +860,7 @@ lbfgs_fit(
|
||||||
cm=0;
|
cm=0;
|
||||||
ci=0;
|
ci=0;
|
||||||
|
|
||||||
while (ck<itmax) {
|
while (ck<itmax && isnormal(gradnrm) && gradnrm>CLM_STOP_THRESH) {
|
||||||
/* mult with hessian pk=-H_k*gk */
|
/* mult with hessian pk=-H_k*gk */
|
||||||
if (ck<M) {
|
if (ck<M) {
|
||||||
mult_hessian(m,pk,gk,s,y,rho,ck,ci);
|
mult_hessian(m,pk,gk,s,y,rho,ck,ci);
|
||||||
|
|
Loading…
Reference in New Issue