ADMB Documentation  11.1.1932
 All Classes Files Functions Variables Typedefs Friends Defines
tpl2cpp_output.hpp
Go to the documentation of this file.
00001 // $Id: tpl2cpp_output.hpp 1735 2014-03-04 20:54:35Z johnoel $
00002 /*
00003  *
00004  * Author: Hans J. Skaug
00005  * Copyright (c) 2009-2012 ADMB foundation
00006  */
00025 class model_data : public ad_comm{
00026   data_int n;
00027   data_matrix Y;
00028   double y2;
00029   double penalty;
00030   ~model_data();
00031   model_data(int argc,char * argv[]);
00032   friend class model_parameters;
00033 };
00034 
00038 class model_parameters : public model_data ,
00039   public function_minimizer
00040 {
00041 public:
00042   ~model_parameters();
00043   void preliminary_calculations(void);
00044   void set_runtime(void);
00045   virtual void * mycast(void) {return (void*)this;}
00046   static int mc_phase(void)
00047   {
00048     return initial_params::mc_phase;
00049   }
00050   static int mceval_phase(void)
00051   {
00052     return initial_params::mceval_phase;
00053   }
00054   static int sd_phase(void)
00055   {
00056     return initial_params::sd_phase;
00057   }
00058   static int current_phase(void)
00059   {
00060     return initial_params::current_phase;
00061   }
00062   static int last_phase(void)
00063   {
00064     return (initial_params::current_phase
00065       >=initial_params::max_number_phases);
00066   }
00067   static prevariable current_feval(void)
00068   {
00069     return *objective_function_value::pobjfun;
00070   }
00071 private:
00072   ivector integer_control_flags;
00073   dvector double_control_flags;
00074   param_init_vector alpha;
00075   param_init_bounded_vector beta;
00076   param_init_bounded_number gamma;
00077   param_number x1;
00078   param_vector x2;
00079   param_stddev_vector x3;
00080   param_number prior_function_value;
00081   param_number likelihood_function_value;
00082   objective_function_value l;
00083   void between_phases_calculations(void);
00084 public:
00085   virtual void userfunction(void);
00086   virtual void report(void);
00087   virtual void final_calcs(void);
00088   model_parameters(int sz,int argc, char * argv[]);
00089   virtual void initializationfunction(void);
00090   void my_function(void);
00091 };
00092 #endif