Revision 1258 trunk/src/df1b2separable/df1b2lp8.cpp
df1b2lp8.cpp (revision 1258)  

399  399 
void laplace_approximation_calculator:: 
400  400 
check_hessian_type(function_minimizer * pfmin) 
401  401 
{ 
402 
//int i,j,ip; 

403 
int i,ip; 

402 
int ip = 0; 

404  403 
if (quadratic_prior::get_num_quadratic_prior()>0) 
405  404 
{ 
406  405 
hesstype=4; 
...  ...  
496  495 
// turn triplet_informaiton into compressed_triplet_information 
497  496 
int mmin= triplet_information>indexmin(); 
498  497 
int mmax= triplet_information>indexmax(); 
499 
int i; 

500  498 
int ndim=0; 
501 
for (i=mmin;i<=mmax;i++) 

499 
for (int i=mmin;i<=mmax;i++)


502  500 
{ 
503  501 
if (allocated((*triplet_information)(i))) 
504  502 
{ 
...  ...  
513  511 
compressed_triplet_information=new imatrix(1,ndim,1,3); 
514  512 
(*compressed_triplet_information)(3).fill_seqadd(1,1); 
515  513 
int ii=0; 
516 
for (i=mmin;i<=mmax;i++) 

514 
for (int i=mmin;i<=mmax;i++)


517  515 
{ 
518  516 
if (allocated((*triplet_information)(i))) 
519  517 
{ 
520  518 
int jmin=(*triplet_information)(i,1).indexmin(); 
521  519 
int jmax=(*triplet_information)(i,1).indexmax(); 
522 
int j; 

523 
for (j=jmin;j<=jmax;j++) 

520 
for (int j=jmin;j<=jmax;j++) 

524  521 
{ 
525  522 
ii++; 
526  523 
(*compressed_triplet_information)(ii,1)= 
...  ...  
535  532 
cti=sort(cti,1); 
536  533 
int lmin=1; 
537  534 
int lmax=0; 
538 
for (i=2;i<=ndim;i++) 

535 
for (int i=2;i<=ndim;i++)


539  536 
{ 
540  537 
if (cti(i,1)>cti(i1,1)) 
541  538 
{ 
...  ...  
553  550 
quadratic_prior::in_qp_calculations=0; 
554  551  
555  552 
int non_block_diagonal=0; 
556 
for (i=xsize+1;i<=xsize+usize;i++) 

553 
for (int i=xsize+1;i<=xsize+usize;i++)


557  554 
{ 
558  555 
if (used_flags(i)>1) 
559  556 
{ 
...  ...  
994  991 
int num_local_re=0; 
995  992 
int num_fixed_effects=0; 
996  993  
997 
int i; 

998  994 
ivector lre_index(1,funnel_init_var::num_active_parameters); 
999  995 
ivector lfe_index(1,funnel_init_var::num_active_parameters); 
1000  996  
1001 
for (i=1;i<=funnel_init_var::num_active_parameters;i++) 

997 
for (int i=1;i<=funnel_init_var::num_active_parameters;i++)


1002  998 
{ 
1003  999 
if (list(i,1)>xsize) 
1004  1000 
{ 
...  ...  
1012  1008  
1013  1009 
//if (num_local_re > 0) 
1014  1010 
{ 
1015 
int j; 

1016  1011 
switch(hesstype) 
1017  1012 
{ 
1018  1013 
case 3: 
...  ...  
1020  1015 
save_number_of_local_effects(num_separable_calls, 
1021  1016 
&num_local_re_array,&num_local_fixed_array,num_local_re, 
1022  1017 
num_fixed_effects); //,lre_index,lfe_index); 
1023 
for (i=1;i<=num_local_re;i++) 

1018 
for (int i=1;i<=num_local_re;i++)


1024  1019 
{ 
1025  1020 
int lrei=lre_index(i); 
1026 
for (j=1;j<=num_local_re;j++) 

1021 
for (int j=1;j<=num_local_re;j++)


1027  1022 
{ 
1028  1023 
int lrej=lre_index(j); 
1029  1024 
int i1=list(lrei,1)xsize; 
...  ...  
1062  1057 
imatrix tmp(1,2,1,dim); 
1063  1058  
1064  1059 
int ii=0; 
1065 
for (i=1;i<=num_local_re;i++) 

1060 
for (int i=1;i<=num_local_re;i++)


1066  1061 
{ 
Also available in: Unified diff