Revision 2165 trunk/src/nh99/model12.cpp

model12.cpp (revision 2165)
99 99
}
100 100

  
101 101
void param_init_matrix::save_value(const ofstream& _ofs, int prec,
102
  const dvector&g, int& offset)
102
  const dvector& g, int& offset)
103 103
{
104
  //ADUNCONST(ofstream,ofs)
105
  //cerr << "not done yet" << endl;
106
  //ad_exit(1);
107
  ofstream& ofs = (ofstream&)_ofs;
108
  ofs << setw(prec+6) << setprecision(prec) << dvar_matrix(*this) << endl;
104
  ADUNCONST(ofstream,ofs)
105
  int rmin=indexmin();
106
  int rmax=indexmax();
107
  for (int i=rmin;i<=rmax;i++)
108
  {
109
    int cmin=(*this)(i).indexmin();
110
    int cmax=(*this)(i).indexmax();
111
    for (int j=cmin;j<=cmax;j++)
112
    {
113
      ofs << label()
114
	  << "(" << i << "," <<  j << ") "
115
	  << setw(prec+6) << setprecision(prec) << (*this)(i,j) << " "
116
	  << setw(prec+6) << setprecision(prec) << g(offset++) << endl;
117
    }
118
  }
109 119
}

Also available in: Unified diff