ADMB Documentation  11.1.1927
 All Classes Files Functions Variables Typedefs Friends Defines
model11.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: model11.cpp 1919 2014-04-22 22:02:01Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00007 #include <admodel.h>
00008 
00009 cifstream& operator>>(const cifstream&, const prevariable&);
00010 
00011 cifstream& operator>>(const cifstream& _s, const param_init_number& x)
00012 {
00013   cifstream&  s=(cifstream&) _s;
00014   s >> value(x);
00015   return s;
00016 }
00017 
00018 cifstream& operator>>(const cifstream& _s, const param_init_vector& _v)
00019 {
00020   ADUNCONST(param_init_vector,v)
00021   cifstream&  s=(cifstream&) _s;
00022   int mmin=v.indexmin();
00023   int mmax=v.indexmax();
00024   for (int i=mmin;i<=mmax;i++)
00025   {
00026     s >> v(i);
00027     if (!s)
00028     {
00029       cerr << "Error reading element " << i << " of the vector "
00030         << v.label() << endl;
00031     }
00032   }
00033   return s;
00034 }
00035 
00036 cifstream& operator>>(const cifstream& _s, const param_init_matrix& m)
00037 {
00038   cifstream&  s=(cifstream&) _s;
00039   s >> dvar_matrix(m);
00040   return s;
00041 }
00042 
00043 ostream& operator<<(const ostream& _s, const label_class& lc)
00044 {
00045   ostream&  s=(ostream&) _s;
00046   s << "# " << lc.name <<":" << endl;
00047   return s;
00048 }
00049 
00050 void named_dvar_matrix::allocate(int rmin,int rmax,int cmin,int cmax,
00051   const char * s)
00052 {
00053   dvar_matrix::allocate(rmin,rmax,cmin,cmax);
00054   model_name_tag::allocate(s);
00055 }
00056 
00057 void named_dvar_matrix::allocate(int rmin,int rmax,
00058   const char * s)
00059 {
00060   dvar_matrix::allocate(rmin,rmax);
00061   model_name_tag::allocate(s);
00062 }
00063 
00064 void named_dvar_matrix::allocate(const char * s)
00065 {
00066   dvar_matrix::allocate();
00067   model_name_tag::allocate(s);
00068 }
00069 
00070 void named_dvar_matrix::allocate(int rmin,int rmax,const index_type& cmin,
00071   const index_type& cmax, const char * s)
00072 {
00073   dvar_matrix::allocate(rmin,rmax,cmin,cmax);
00074   model_name_tag::allocate(s);
00075 }
00076 
00077 named_dvar_matrix& named_dvar_matrix::operator=(const dvar_matrix& m)
00078 {
00079   this->dvar_matrix::operator=(m);
00080   return *this;
00081 }
00082 named_dvar_matrix& named_dvar_matrix::operator=(const dmatrix& m)
00083 {
00084   this->dvar_matrix::operator=(m);
00085   return *this;
00086 }
00087 named_dvar_matrix& named_dvar_matrix::operator = (CGNU_DOUBLE m)
00088 {
00089   this->dvar_matrix::operator=(m);
00090   return *this;
00091 }
00092 
00093 named_dvar_matrix& named_dvar_matrix::operator=(const dvariable& m)
00094 {
00095   this->dvar_matrix::operator=(m);
00096   return *this;
00097 }
00098 
00099 
00100 param_stddev_matrix& param_stddev_matrix::operator=(const dvar_matrix& m)
00101 {
00102   this->dvar_matrix::operator=(m);
00103   return *this;
00104 }
00105 param_stddev_matrix& param_stddev_matrix::operator=(const dmatrix& m)
00106 {
00107   this->dvar_matrix::operator=(m);
00108   return *this;
00109 }
00110 param_stddev_matrix& param_stddev_matrix::operator = (CGNU_DOUBLE m)
00111 {
00112   this->dvar_matrix::operator=(m);
00113   return *this;
00114 }
00115 
00116 param_stddev_vector& param_stddev_vector::operator=(const dvar_vector& m)
00117 {
00118   this->dvar_vector::operator=(m);
00119   return *this;
00120 }
00121 
00122 named_dvar_vector& named_dvar_vector::operator=(const dvar_vector& m)
00123 {
00124   this->dvar_vector::operator=(m);
00125   return *this;
00126 }
00127 named_dvar_vector& named_dvar_vector::operator=(const dvector& m)
00128 {
00129   this->dvar_vector::operator=(m);
00130   return *this;
00131 }
00132 named_dvar_vector& named_dvar_vector::operator = (CGNU_DOUBLE m)
00133 {
00134   this->dvar_vector::operator=(m);
00135   return *this;
00136 }
00137 
00138 named_dvar_vector& named_dvar_vector::operator=(const prevariable& m)
00139 {
00140   this->dvar_vector::operator=(m);
00141   return *this;
00142 }
00143 
00144 named_dvector& named_dvector::operator=(const dvector& m)
00145 {
00146   this->dvector::operator=(m);
00147   return *this;
00148 }
00149 named_dvector& named_dvector::operator = (CGNU_DOUBLE m)
00150 {
00151   this->dvector::operator=(m);
00152   return *this;
00153 }
00154 
00155 data_vector& data_vector::operator=(const dvector& m)
00156 {
00157   this->dvector::operator=(m);
00158   return *this;
00159 }
00160 data_vector& data_vector::operator = (CGNU_DOUBLE m)
00161 {
00162   this->dvector::operator=(m);
00163   return *this;
00164 }
00165 
00166 
00167 param_stddev_vector& param_stddev_vector::operator=(const dvector& m)
00168 {
00169   this->dvar_vector::operator=(m);
00170   return *this;
00171 }
00172 param_stddev_vector& param_stddev_vector::operator = (CGNU_DOUBLE m)
00173 {
00174   this->dvar_vector::operator=(m);
00175   return *this;
00176 }
00177 
00178 param_init_number& param_init_number::operator = (CGNU_DOUBLE m)
00179 {
00180   this->dvariable::operator=(m);
00181   return *this;
00182 }
00183 
00184 param_init_number& param_init_number::operator=(const prevariable& m)
00185 {
00186   this->dvariable::operator=(m);
00187   return *this;
00188 }
00189 
00190 param_init_bounded_number& param_init_bounded_number::operator = (CGNU_DOUBLE m)
00191 {
00192   this->dvariable::operator=(m);
00193   return *this;
00194 }
00195 
00196 param_init_bounded_number& param_init_bounded_number::operator=(
00197   const prevariable& m)
00198 {
00199   this->dvariable::operator=(m);
00200   return *this;
00201 }
00202 
00203   const char * param_init_matrix::label(void)
00204   {
00205     return model_name_tag::label().mychar();
00206   }
00207 
00208 
00209   const char * param_init_bounded_number::label(void)
00210   {
00211     return model_name_tag::label().mychar();
00212   }
00213 
00214 
00215   const char * param_init_bounded_vector::label(void)
00216   {
00217     return model_name_tag::label().mychar();
00218   }
00219 
00220 
00221   const char * param_init_vector::label(void)
00222   {
00223     return model_name_tag::label().mychar();
00224   }
00225 
00226 
00227   const char * param_init_number::label(void)
00228   {
00229     return model_name_tag::label().mychar();
00230   }
00231 
00232 
00233 void named_dvar3_array::allocate(int hsl,int hsu,int rmin,int rmax,
00234   int cmin,int cmax,const char * s)
00235 {
00236   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00237   model_name_tag::allocate(s);
00238 }
00239 
00240 void named_dvar3_array::allocate(int hsl,int hsu,int rmin,int rmax,
00241   const char * s)
00242 {
00243   dvar3_array::allocate(hsl,hsu,rmin,rmax);
00244   model_name_tag::allocate(s);
00245 }
00246 
00247 void named_dvar3_array::allocate(int hsl,int hsu,
00248   const index_type& rmin,const index_type& rmax, const char * s)
00249 {
00250   dvar3_array::allocate(hsl,hsu,rmin,rmax);
00251   model_name_tag::allocate(s);
00252 }
00253 
00254 void named_dvar3_array::allocate(int hsl,int hsu,const char * s)
00255 {
00256   dvar3_array::allocate(hsl,hsu);
00257   model_name_tag::allocate(s);
00258 }
00259 
00260 void named_dvar3_array::allocate(const char * s)
00261 {
00262   dvar3_array::allocate();
00263   model_name_tag::allocate(s);
00264 }
00265 
00266 void named_dvar3_array::allocate(int hsl, int hsu, const ivector& rmin,
00267   int rmax, int cmin, int cmax, const char *s)
00268 {
00269   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00270   model_name_tag::allocate(s);
00271 }
00272 
00273 void named_dvar3_array::allocate(int hsl,int hsu,int rmin,
00274   const ivector& rmax, int cmin, int cmax, const char *s)
00275 {
00276   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00277   model_name_tag::allocate(s);
00278 }
00279 
00280 void named_dvar3_array::allocate(int hsl, int hsu, const ivector& rmin,
00281   const ivector& rmax, int cmin, int cmax, const char *s)
00282 {
00283   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00284   model_name_tag::allocate(s);
00285 }
00286 
00287 
00288 void named_dvar3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00289   const ivector& cmin, int cmax, const char *s)
00290 {
00291   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00292   model_name_tag::allocate(s);
00293 }
00294 
00295 void named_dvar3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00296   const ivector& cmin, const ivector&  cmax, const char *s)
00297 {
00298   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00299   model_name_tag::allocate(s);
00300 }
00301 
00302 void named_dvar3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00303   int cmin, const ivector& cmax, const char *s)
00304 {
00305   dvar3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00306   model_name_tag::allocate(s);
00307 }
00308 
00309 named_dvar3_array& named_dvar3_array::operator=(const dvar3_array& m)
00310 {
00311   this->dvar3_array::operator=(m);
00312   return *this;
00313 }
00314 
00315 
00316 
00317 named_dvar3_array& named_dvar3_array::operator=(const d3_array& m)
00318 {
00319   this->dvar3_array::operator=(m);
00320   return *this;
00321 }
00322 void named_dmatrix::allocate(int rmin,int rmax,int cmin,int cmax,
00323   const char * s)
00324 {
00325   dmatrix::allocate(rmin,rmax,cmin,cmax);
00326   model_name_tag::allocate(s);
00327 }
00328 
00329 
00330 void named_dmatrix::allocate(int rmin,int rmax,const ivector& cmin,int cmax,
00331   const char * s)
00332 {
00333   dmatrix::allocate(rmin,rmax,cmin,cmax);
00334   model_name_tag::allocate(s);
00335 }
00336 
00337 
00338 void named_dmatrix::allocate(int rmin,int rmax,const char * s)
00339 {
00340   dmatrix::allocate(rmin,rmax);
00341   model_name_tag::allocate(s);
00342 }
00343 
00344 
00345 void named_dmatrix::allocate(const char * s)
00346 {
00347   dmatrix::allocate();
00348   model_name_tag::allocate(s);
00349 }
00350 
00351 
00352 void named_dmatrix::allocate(int rmin,int rmax,int cmin,const ivector& cmax,
00353   const char * s)
00354 {
00355   dmatrix::allocate(rmin,rmax,cmin,cmax);
00356   model_name_tag::allocate(s);
00357 }
00358 
00359 void named_dmatrix::allocate(int rmin,int rmax,const ivector& cmin,
00360   const ivector& cmax, const char * s)
00361 {
00362   dmatrix::allocate(rmin,rmax,cmin,cmax);
00363   model_name_tag::allocate(s);
00364 }
00365 
00366 named_dmatrix& named_dmatrix::operator=(const dmatrix& m)
00367 {
00368   dmatrix::operator=(m);
00369   return *this;
00370 }
00371 named_dmatrix& named_dmatrix::operator=(CGNU_DOUBLE m)
00372 {
00373   dmatrix::operator=(m);
00374   return *this;
00375 }
00376 
00377 param_stddev_number& param_stddev_number::operator=(const prevariable& m)
00378 {
00379   prevariable::operator=(m);
00380   return *this;
00381 }
00382 
00383 param_stddev_number& param_stddev_number::operator = (CGNU_DOUBLE m)
00384 {
00385   prevariable::operator=(m);
00386   return *this;
00387 }
00388 
00389 named_dvariable& named_dvariable::operator = (CGNU_DOUBLE m)
00390 {
00391   prevariable::operator=(m);
00392   return *this;
00393 }
00394 
00395 named_dvariable& named_dvariable::operator=(const prevariable& m)
00396 {
00397   prevariable::operator=(m);
00398   return *this;
00399 }
00400 
00401 void named_d3_array::allocate(int hsl,int hsu,int rmin,int rmax,
00402   int cmin,int cmax,const char * s)
00403 {
00404   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00405   model_name_tag::allocate(s);
00406 }
00407 
00408 void named_d3_array::allocate(int hsl,int hsu,int rmin,int rmax,
00409   const char * s)
00410 {
00411   d3_array::allocate(hsl,hsu,rmin,rmax);
00412   model_name_tag::allocate(s);
00413 }
00414 
00415 void named_d3_array::allocate(int hsl,int hsu,
00416   const index_type& rmin,const index_type& rmax,const char * s)
00417 {
00418   d3_array::allocate(hsl,hsu,rmin,rmax);
00419   model_name_tag::allocate(s);
00420 }
00421 
00422 void named_d3_array::allocate(int hsl,int hsu,const char * s)
00423 {
00424   d3_array::allocate(hsl,hsu);
00425   model_name_tag::allocate(s);
00426 }
00427 
00428 void named_d3_array::allocate(const char * s)
00429 {
00430   d3_array::allocate();
00431   model_name_tag::allocate(s);
00432 }
00433 
00434 void named_d3_array::allocate(int hsl, int hsu, const index_type& rmin,
00435   const index_type& rmax, const index_type& cmin,
00436   const index_type& cmax, const char *s)
00437 {
00438   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00439   model_name_tag::allocate(s);
00440 }
00441 
00442 void named_d3_array::allocate(int hsl, int hsu, const ivector& rmin,
00443   int rmax,int cmin,int  cmax,const char * s)
00444 {
00445   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00446   model_name_tag::allocate(s);
00447 }
00448 
00449 void named_d3_array::allocate(int hsl,int hsu,int rmin,
00450   const ivector& rmax, int cmin, int  cmax, const char *s)
00451 {
00452   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00453   model_name_tag::allocate(s);
00454 }
00455 
00456 void named_d3_array::allocate(int hsl, int hsu, const ivector& rmin,
00457   const ivector& rmax,int cmin,int  cmax,const char * s)
00458 {
00459   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00460   model_name_tag::allocate(s);
00461 }
00462 
00463 void named_d3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00464   const ivector& cmin, int cmax, const char *s)
00465 {
00466   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00467   model_name_tag::allocate(s);
00468 }
00469 
00470 void named_d3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00471   int cmin, const ivector& cmax, const char *s)
00472 {
00473   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00474   model_name_tag::allocate(s);
00475 }
00476 
00477 void named_d3_array::allocate(int hsl, int hsu, int rmin, int rmax,
00478   const ivector& cmin, const ivector& cmax, const char * s)
00479 {
00480   d3_array::allocate(hsl,hsu,rmin,rmax,cmin,cmax);
00481   model_name_tag::allocate(s);
00482 }
00483 
00484 named_d3_array& named_d3_array::operator=(const d3_array& m)
00485 {
00486   d3_array::operator=(m);
00487   return *this;
00488 }
00489 
00490 data_matrix& data_matrix::operator=(const dmatrix& m)
00491 {
00492   named_dmatrix::operator = (m);
00493   return *this;
00494 }
00495 
00496 data_matrix& data_matrix::operator=(const double& m)
00497 {
00498   named_dmatrix::operator = (m);
00499   return *this;
00500 }