Statistics
| Revision:

root / branches / threaded2 / src / nh99 / model13.cpp @ 752

History | View | Annotate | Download (798 Bytes)

1
/*
2
 * $Id: model13.cpp 752 2013-02-14 21:09:59Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
6
 */
7
#include <admodel.h>
8

    
9
void initial_params::restore(const ifstream& ofs)
10
{
11
  for (int i=0;i<num_initial_params;i++)
12
  {
13
    //(varsptr->operator[](i))->restore_value(ofs);
14
    (*varsptr)[i]->restore_value(ofs);
15
  }
16
}
17

    
18
void param_init_number::restore_value(const ifstream& ofs)
19
  {
20
    #ifndef __ZTC__
21
      ofs  >> dvariable(*this);
22
    #else
23
      ofs  >> *this;
24
    #endif
25
  }
26

    
27
void param_init_vector::restore_value(const ifstream& ofs)
28
  {
29
    ofs  >> dvar_vector(*this);
30
  }
31

    
32
void param_init_bounded_vector::restore_value(const ifstream& ofs)
33
  {
34
    ofs  >> dvar_vector(*this);
35
  }
36

    
37
void param_init_matrix::restore_value(const ifstream& ofs)
38
  {
39
    ofs  >> dvar_matrix(*this);
40
  }