Revision 1592 trunk/src/nh99/mod_hess.cpp
mod_hess.cpp (revision 1592)  

19  19 
void hess_errorreport(void); 
20  20 
void set_labels_for_hess(int); 
21  21  
22 
class admb_javapointers; 

23 
extern admb_javapointers * adjm_ptr; 

24 
void useless(const double& sdelta2); 

22 
void useless(const double& sdelta2){/*int i=0;*/} 

23  
25  24 
// estimate the matrix of second derivatives 
26  25 
void ad_update_hess_stats_report(int i,int nvar); 
27  26  
...  ...  
35  34 
else 
36  35 
{ 
37  36 
#endif 
38 
# if !defined(USE_ADPVM) 

39 
hess_routine_noparallel(); 

40 
# else 

41  
37 
#if !defined(USE_ADPVM) 

38 
hess_routine_noparallel(); 

39 
#else 

42  40 
if (!ad_comm::pvm_manager) 
43  41 
{ 
44  42 
hess_routine_noparallel(); 
...  ...  
54  52 
hess_routine_slave(); 
55  53 
break; 
56  54 
default: 
57 
cerr << "error illega value for pvm_manager>mode" << endl;


55 
cerr << "Error: Illegal value for pvm_manager>mode." << endl;


58  56 
ad_exit(1); 
59  57 
} 
60  58 
cout << "finished hess routine" << endl; 
61  59 
} 
62 
# endif


60 
#endif 

63  61 
#if defined(USE_LAPLACE) 
64  62 
} 
65  63 
#endif 
66  64 
} 
67  
68  65 
void function_minimizer::hess_routine_noparallel(void) 
69  66 
{ 
70  67  
...  ...  
104  101 
double sdelta2; 
105  102 
for (int i=1;i<=nvar;i++) 
106  103 
{ 
107 
#if defined (__SPDLL__) 

108  104 
hess_calcreport(i,nvar); 
109 
#else 

110 
cout << "Estimating row " << i << " out of " << nvar 

111 
<< " for hessian" << endl; 

112 
#endif 

113  105  
114  106 
double xsave=x(i); 
115  107 
sdelta1=x(i)+delta; 
...  ...  
218  210  
219  211 
for (int i=1;i<=nvar;i++) 
220  212 
{ 
221 
#if defined (__SPDLL__) 

222  213 
hess_calcreport(i,nvar); 
223 
#else 

224 
cout << "Estimating row " << i << " out of " << nvar 

225 
<< " for hessian" << endl; 

226 
#endif 

227  214  
228  215 
double f=0.0; 
229  216 
double xsave=x(i); 
...  ...  
461  448 
} 
462  449 
*/ 
463  450  
464 
// calculate the derivatives of dependent variables with respect to 

465 
// the independent variables 

466  
451 
/** 

452 
Calculate the derivatives of dependent variables with respect to 

453 
the independent variables. 

454 
*/ 

467  455 
void function_minimizer::depvars_routine(void) 
468  456 
{ 
469  457 
reset_gradient_stack(); 
...  ...  
514  502 
#endif 
515  503 
gradient_structure::set_NO_DERIVATIVES(); 
516  504 
} 
517  
518 
// symmetrize and invert the hessian 

505 
/** 

506 
Symmetrize and invert the hessian 

507 
*/ 

519  508 
void function_minimizer::hess_inv(void) 
520  509 
{ 
Also available in: Unified diff