| line |
true |
false |
branch |
|
121
|
0 |
119 |
if(n
|
|
|
0 |
6 |
if(n
|
|
126
|
0 |
119 |
if(!jacf){ |
|
|
0 |
6 |
if(!jacf){ |
|
132
|
119 |
0 |
if(opts){ |
|
|
6 |
0 |
if(opts){ |
|
147
|
0 |
119 |
if(!work){ |
|
|
0 |
6 |
if(!work){ |
|
150
|
0 |
0 |
if(!work){ |
|
|
0 |
0 |
if(!work){ |
|
179
|
0 |
119 |
if(!LM_FINITE(p_eL2)) stop=7; |
|
|
0 |
6 |
if(!LM_FINITE(p_eL2)) stop=7; |
|
181
|
15964 |
4 |
for(k=0; k
|
|
|
15948 |
16 |
for(k=0; k
|
|
|
15031 |
3 |
for(k=0; k
|
|
|
15029 |
2 |
for(k=0; k
|
|
184
|
99 |
15849 |
if(p_eL2<=eps3){ /* error is small */ |
|
|
1 |
15028 |
if(p_eL2<=eps3){ /* error is small */ |
|
197
|
15240 |
609 |
if(nm<__BLOCKSZ__SQ){ // this is a small problem |
|
|
15028 |
0 |
if(nm<__BLOCKSZ__SQ){ // this is a small problem |
|
221
|
60960 |
15240 |
for(i=m*m; i-->0; ) |
|
|
60112 |
15028 |
for(i=m*m; i-->0; ) |
|
223
|
30480 |
15240 |
for(i=m; i-->0; ) |
|
|
30056 |
15028 |
for(i=m; i-->0; ) |
|
226
|
48568 |
15240 |
for(l=n; l-->0; ){ |
|
|
30666 |
15028 |
for(l=n; l-->0; ){ |
|
228
|
97136 |
48568 |
for(i=m; i-->0; ){ |
|
|
61332 |
30666 |
for(i=m; i-->0; ){ |
|
231
|
145704 |
97136 |
for(j=i+1; j-->0; ) /* j<=i computes lower triangular part only */ |
|
|
91998 |
61332 |
for(j=i+1; j-->0; ) /* j<=i computes lower triangular part only */ |
|
239
|
30480 |
15240 |
for(i=m; i-->0; ) /* copy to upper part */ |
|
|
30056 |
15028 |
for(i=m; i-->0; ) /* copy to upper part */ |
|
240
|
15240 |
30480 |
for(j=i+1; j
|
|
|
15028 |
30056 |
for(j=i+1; j
|
|
250
|
1278 |
609 |
for(i=0; i
|
|
|
0 |
0 |
for(i=0; i
|
|
253
|
1473000 |
609 |
for(i=0; i
|
|
|
0 |
0 |
for(i=0; i
|
|
256
|
3006000 |
1473000 |
for(l=0, jacrow=jac+i*m, tmp=e[i]; l
|
|
|
0 |
0 |
for(l=0, jacrow=jac+i*m, tmp=e[i]; l
|
|
262
|
31758 |
15849 |
for(i=0, p_L2=jacTe_inf=0.0; i
|
|
|
30056 |
15028 |
for(i=0, p_L2=jacTe_inf=0.0; i
|
|
263
|
25354 |
6404 |
if(jacTe_inf < (tmp=FABS(jacTe[i]))) jacTe_inf=tmp; |
|
|
25530 |
6228 |
if(jacTe_inf < (tmp=FABS(jacTe[i]))) jacTe_inf=tmp; |
|
|
24425 |
5631 |
if(jacTe_inf < (tmp=FABS(jacTe[i]))) jacTe_inf=tmp; |
|
|
24334 |
5722 |
if(jacTe_inf < (tmp=FABS(jacTe[i]))) jacTe_inf=tmp; |
|
280
|
0 |
15849 |
if((jacTe_inf <= eps1)){ |
|
|
0 |
15028 |
if((jacTe_inf <= eps1)){ |
|
287
|
119 |
15730 |
if(k==0){ |
|
|
6 |
15022 |
if(k==0){ |
|
288
|
250 |
119 |
for(i=0, tmp=LM_REAL_MIN; i
|
|
|
12 |
6 |
for(i=0, tmp=LM_REAL_MIN; i
|
|
289
|
153 |
97 |
if(diag_jacTjac[i]>tmp) tmp=diag_jacTjac[i]; /* find max diagonal element */ |
|
|
6 |
6 |
if(diag_jacTjac[i]>tmp) tmp=diag_jacTjac[i]; /* find max diagonal element */ |
|
296
|
41850 |
20895 |
for(i=0; i
|
|
|
39212 |
19606 |
for(i=0; i
|
|
323
|
20895 |
0 |
if(issolved){ |
|
|
19606 |
0 |
if(issolved){ |
|
325
|
41850 |
20895 |
for(i=0, Dp_L2=0.0; i
|
|
|
39212 |
19606 |
for(i=0, Dp_L2=0.0; i
|
|
331
|
4 |
20891 |
if(Dp_L2<=eps2_sq*p_L2){ /* relative change in p is small, stop */ |
|
|
2 |
19604 |
if(Dp_L2<=eps2_sq*p_L2){ /* relative change in p is small, stop */ |
|
337
|
0 |
20891 |
if(Dp_L2>=(p_L2+eps2)/(LM_CNST(EPSILON)*LM_CNST(EPSILON))){ /* almost singular */ |
|
|
0 |
19604 |
if(Dp_L2>=(p_L2+eps2)/(LM_CNST(EPSILON)*LM_CNST(EPSILON))){ /* almost singular */ |
|
354
|
12 |
20879 |
if(!LM_FINITE(pDp_eL2)){ /* sum of squares is not finite, most probably due to a user error. |
|
|
0 |
19604 |
if(!LM_FINITE(pDp_eL2)){ /* sum of squares is not finite, most probably due to a user error. |
|
362
|
41818 |
20879 |
for(i=0, dL=0.0; i
|
|
|
39208 |
19604 |
for(i=0, dL=0.0; i
|
|
367
|
20879 |
0 |
if(dL>0.0 && dF>0.0){ /* reduction in error, increment is accepted */ |
|
|
15833 |
5046 |
if(dL>0.0 && dF>0.0){ /* reduction in error, increment is accepted */ |
|
|
19604 |
0 |
if(dL>0.0 && dF>0.0){ /* reduction in error, increment is accepted */ |
|
|
15026 |
4578 |
if(dL>0.0 && dF>0.0){ /* reduction in error, increment is accepted */ |
|
370
|
11741 |
4092 |
mu=mu*( (tmp>=LM_CNST(ONE_THIRD))? tmp : LM_CNST(ONE_THIRD) ); |
|
|
11834 |
3192 |
mu=mu*( (tmp>=LM_CNST(ONE_THIRD))? tmp : LM_CNST(ONE_THIRD) ); |
|
373
|
31726 |
15833 |
for(i=0 ; i
|
|
|
30052 |
15026 |
for(i=0 ; i
|
|
376
|
1509556 |
15833 |
for(i=0; i
|
|
|
30660 |
15026 |
for(i=0; i
|
|
389
|
0 |
5046 |
if(nu2<=nu){ /* nu has wrapped around (overflown). Thanks to Frank Jordan for spotting this case */ |
|
|
0 |
4578 |
if(nu2<=nu){ /* nu has wrapped around (overflown). Thanks to Frank Jordan for spotting this case */ |
|
395
|
10092 |
5046 |
for(i=0; i
|
|
|
9156 |
4578 |
for(i=0; i
|
|
400
|
4 |
115 |
if(k>=itmax) stop=3; |
|
|
3 |
3 |
if(k>=itmax) stop=3; |
|
402
|
250 |
119 |
for(i=0; i
|
|
|
12 |
6 |
for(i=0; i
|
|
405
|
119 |
0 |
if(info){ |
|
|
6 |
0 |
if(info){ |
|
410
|
250 |
119 |
for(i=0, tmp=LM_REAL_MIN; i
|
|
|
12 |
6 |
for(i=0, tmp=LM_REAL_MIN; i
|
|
411
|
194 |
56 |
if(tmp
|
|
|
9 |
3 |
if(tmp
|
|
421
|
119 |
0 |
if(covar){ |
|
|
6 |
0 |
if(covar){ |
|
425
|
0 |
119 |
if(freework) free(work); |
|
|
0 |
6 |
if(freework) free(work); |
|
428
|
119 |
0 |
if(linsolver) (*linsolver)(NULL, NULL, NULL, 0); |
|
|
6 |
0 |
if(linsolver) (*linsolver)(NULL, NULL, NULL, 0); |
|
431
|
119 |
0 |
return (stop!=4 && stop!=7)? k : LM_ERROR; |
|
|
107 |
12 |
return (stop!=4 && stop!=7)? k : LM_ERROR; |
|
|
6 |
0 |
return (stop!=4 && stop!=7)? k : LM_ERROR; |
|
|
6 |
0 |
return (stop!=4 && stop!=7)? k : LM_ERROR; |