Revision 752 branches/threaded2/src/df1b2-separable/mod_rhes.cpp

mod_rhes.cpp (revision 752)
87 87

  
88 88
  return L;
89 89
}
90

  
91
void useless(const double& sdelta2);
92

  
93 90
/**
94 91
 * Description not yet available.
95 92
 * \param
......
163 160
      if (lapprox->block_diagonal_hessian)
164 161
      {
165 162
        //if (ad_comm::wd_flag)
166
        tmpstring = ad_comm::adprogram_name + ".rhes";
163
        tmpstring = *ad_comm::adprogram_name + ".rhes";
167 164
        ofstream ofs((char*)(tmpstring));
168 165
            ofs << "   value      std.dev" << endl;
169 166
        int mmin=lapprox->block_diagonal_hessian->indexmin();
......
193 190
      else if (lapprox->bHess)
194 191
      {
195 192
        //if (ad_comm::wd_flag)
196
        tmpstring = ad_comm::adprogram_name + ".rhes";
193
        tmpstring = *ad_comm::adprogram_name + ".rhes";
197 194
        ofstream ofs((char*)(tmpstring));
198 195
            ofs << "   value      std.dev" << endl;
199 196
        int mmin=lapprox->bHess->indexmin();
......
226 223
      int i;
227 224
      //if (ad_comm::wd_flag)
228 225
      dmatrix m;
229
      tmpstring = ad_comm::adprogram_name + ".rhes";
226
      tmpstring = *ad_comm::adprogram_name + ".rhes";
230 227
      ofstream ofs((char*)(tmpstring));
231 228
          ofs << "   value      std.dev" << endl;
232 229
      //int ii=1;
233
      tmpstring = ad_comm::adprogram_name + ".luu";
230
      tmpstring = *ad_comm::adprogram_name + ".luu";
234 231
      uostream ofs1((char*)(tmpstring));
235 232
      dvector & u= lapprox->uhat;
236 233
      if (lapprox->hesstype !=3)
......
304 301

  
305 302
    {
306 303
      int i,j;
307
      tmpstring = ad_comm::adprogram_name + ".luu";
304
      tmpstring = *ad_comm::adprogram_name + ".luu";
308 305
      uistream uis1((char*)(tmpstring));
309 306
      uis1 >> i >> j;
310 307
      cout << i << " " << j << endl;
......
352 349

  
353 350
    // get a number which is exactly representable
354 351
    double sdelta=1.0+delta;
355
    useless(sdelta);
356 352
    sdelta-=1.0;
357 353

  
358 354
    
......
408 404
        adstring tmpstring="admodel.hes";
409 405
        if (ad_comm::wd_flag)
410 406
        {
411
          tmpstring = ad_comm::adprogram_name + ".hes";
407
          tmpstring = *ad_comm::adprogram_name + ".hes";
412 408
        }
413 409
        uostream ofs((char*)tmpstring);
414 410
        ofs << nvar;
......
452 448
      double f=0.0;
453 449
      double xsave=x(i);
454 450
      sdelta1=x(i)+delta;
455
      useless(sdelta1);
456 451
      sdelta1-=x(i);
457 452
      x(i)=xsave+sdelta1;
458 453
      g1=(*lapprox)(x,f,this);
459 454

  
460 455
      sdelta2=x(i)-delta;
461
      useless(sdelta2);
462 456
      sdelta2-=x(i);
463 457
      x(i)=xsave+sdelta2;
464 458
      g2=(*lapprox)(x,f,this);
......
466 460
      hess1=(g1-g2)/(sdelta1-sdelta2);
467 461
 
468 462
      sdelta1=x(i)+eps*delta;
469
      useless(sdelta1);
470 463
      sdelta1-=x(i);
471 464
      x(i)=xsave+sdelta1;
472 465
      g1=(*lapprox)(x,f,this);
473 466

  
474 467
      x(i)=xsave-eps*delta;
475 468
      sdelta2=x(i)-eps*delta;
476
      useless(sdelta2);
477 469
      sdelta2-=x(i);
478 470
      x(i)=xsave+sdelta2;
479 471
      g2=(*lapprox)(x,f,this);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff