Revision 752 branches/threaded2/src/nh99/hybmcmc.cpp

hybmcmc.cpp (revision 752)
307 307
      }
308 308
      if (use_empirical_flag)
309 309
      { 
310
        read_empirical_covariance_matrix(nvar,S,ad_comm::adprogram_name);
310
        read_empirical_covariance_matrix(nvar, S, *ad_comm::adprogram_name);
311 311
      }
312 312
      else if (!rescale_bounded_flag)
313 313
      {
......
318 318
        else
319 319
        {
320 320
          int tmp_nvar;
321
          adstring tmpstring = ad_comm::adprogram_name + ".bgs";
321
          adstring tmpstring = *ad_comm::adprogram_name + ".bgs";
322 322
          uistream uis((char*)(tmpstring));
323 323
          if (!uis)
324 324
          {
......
385 385
    if ( mcrestart_flag>-1)
386 386
    {
387 387
      // check that nvar is correct
388
      uistream uis((char*)(ad_comm::adprogram_name + adstring(".psv")));
388
      uistream uis((char*)(*ad_comm::adprogram_name + adstring(".psv")));
389 389
      if (!uis)
390 390
      {
391
        cerr << "Error trying to open file" << 
392
          ad_comm::adprogram_name + adstring(".psv") <<
391
        cerr << "Error trying to open file" << *ad_comm::adprogram_name + adstring(".psv") <<
393 392
          " for mcrestart" <<   endl;
394 393
        ad_exit(1);
395 394
      } else {
396 395
        int nv1;
397 396
        uis >> nv1;
398 397
        if (nv1 !=nvar) {
399
          cerr << "wrong number of independent variables in" <<
400
            ad_comm::adprogram_name + adstring(".psv") << endl
398
          cerr << "wrong number of independent variables in" << *ad_comm::adprogram_name + adstring(".psv") << endl
401 399
           << " I found " << nv1 << " instead of " << nvar  << endl;
402 400
          ad_exit(1);
403 401
        }
......
411 409
        if (!uis)
412 410
        {
413 411
          cerr << "error resotring last mcmc poistion from file "
414
            << ad_comm::adprogram_name + adstring(".psv") << endl;
412
            << *ad_comm::adprogram_name + adstring(".psv") << endl;
415 413
          ad_exit(1);
416 414
        }
417 415
        int ii=1;
......
428 426

  
429 427
    if ( mcrestart_flag>-1)
430 428
    {
431
      pofs_psave= new uostream( (char*)(ad_comm::adprogram_name 
429
      pofs_psave= new uostream( (char*)(*ad_comm::adprogram_name 
432 430
          + adstring(".psv")),ios::app);
433 431
     /*
434 432
      pofs_psave->seekp(0,std::ios::end);
......
456 454
    else
457 455
    {
458 456
      pofs_psave=
459
        new uostream((char*)(ad_comm::adprogram_name + adstring(".psv")));
457
        new uostream((char*)(*ad_comm::adprogram_name + adstring(".psv")));
460 458
    }
461 459

  
462 460
    if (!pofs_psave|| !(*pofs_psave))
463 461
    {
464
      cerr << "Error trying to open file" << 
465
        ad_comm::adprogram_name + adstring(".psv") << endl;
462
      cerr << "Error trying to open file" << *ad_comm::adprogram_name + adstring(".psv") << endl;
466 463
      ad_exit(1);
467 464
    }
468 465
    if (mcrestart_flag == -1 )

Also available in: Unified diff