ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mod_prof.cpp
Go to the documentation of this file.
1 
5 #include <admodel.h>
6 
8  likeprof_params * likeprof_params::likeprofptr[500]; // this should be
9  // a resizeable array
10 
12  {
13  stepsize=0.5;
14  stepnumber=8;
15  }
16 
18  {
19  likeprofptr[num_likeprof_params++]= this; // this is the list of
20  // likelihood profile objects
21  }
22 
25  {
26  sigma=0.0;
28  // stddev_params::add_to_list(); // don't think we need this here
29  }
30 
35 {
36  return 1;
37 }
38 
39 /*
40  void param_likeprof_number::set_dependent_variables(void)
41  {
42  #ifndef __ZTC__
43  dvariable(*this) << dvariable(*this);
44  #else
45  *this << *this;
46  #endif
47  }
48 */
49 
50  void param_likeprof_number::allocate(const char * _s)
51  {
54  }
55 
56  const char * param_likeprof_number::label(void)
57  {
58  return model_name_tag::label().mychar();
59  }
60 
66 {
68  return *this;
69 }
75 {
76  this->param_stddev_number::operator=(value);
77  return *this;
78 }
79 
80  // for now only do likelihood profiles for numbers
81  /*
82  int likeprof_params::num_likeprof_calc(void)
83  {
84  int nvar=0;
85  for (int i=0;i<num_likeprof_params;i++)
86  {
87  nvar+= (likeprofptr[i])->size_count();
88  }
89  return nvar;
90  }
91 
92  int param_likeprof_vector::size_count(void)
93  {
94  return ::size_count(*this);
95  }
96 
97  param_likeprof_vector::param_likeprof_vector(void) : named_dvar_vector() ,
98  likeprof_params()
99  {
100  add_to_list();
101  }
102 
103  void param_likeprof_vector::allocate(int imin,int imax,const char * s)
104  {
105  named_dvar_vector::allocate(imin,imax,s);
106  likeprof_params::allocate();
107  }
108 
109  void param_likeprof_vector::set_dependent_variables(void)
110  {
111  dvar_vector(*this) << dvar_vector(*this);
112  }
113 
114  param_likeprof_matrix::param_likeprof_matrix() : named_dvar_matrix() ,
115  likeprof_params()
116  {
117  add_to_list();
118  }
119 
120  int param_likeprof_matrix::size_count(void)
121  {
122  return ::size_count(*this);
123  }
124 
125  void param_likeprof_matrix::allocate(int rmin,int rmax,int cmin,int cmax,
126  const char * s)
127  {
128  named_dvar_matrix::allocate(rmin,rmax,cmin,cmax,s);
129  likeprof_params::allocate();
130  }
131 
132  void param_likeprof_matrix::set_dependent_variables(void)
133  {
134  dvar_matrix(*this) << dvar_matrix(*this);
135  }
136 
137  const char * param_likeprof_vector::label(void)
138  {
139  return model_name_tag::label();
140  }
141 
142  const char * param_likeprof_matrix::label(void)
143  {
144  return model_name_tag::label();
145  }
146 */
static likeprof_params * likeprofptr[500]
Definition: admodel.h:2257
Base class for dvariable.
Definition: fvar.hpp:1315
label_class label(void)
Definition: admodel.h:172
Description not yet available.
Definition: admodel.h:2303
double stepsize
Definition: admodel.h:2253
param_likeprof_number & operator=(const prevariable &)
Assign param_likeprof_number with prevariable var.
Definition: mod_prof.cpp:65
const char * mychar(void)
Definition: admodel.h:156
virtual unsigned int size_count() const
Returns the number of active parameters.
Definition: mod_prof.cpp:34
double var(const dvector &vec)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: cranfill.cpp:23
Description not yet available.
void allocate(const char *s)
Definition: model.cpp:583
virtual void add_to_list(void)
Definition: mod_prof.cpp:17
Description not yet available.
Definition: admodel.h:2251
likeprof_params(void)
Definition: mod_prof.cpp:11
Description not yet available.
Definition: admodel.h:2332
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
virtual const char * label(void)
Definition: mod_prof.cpp:56
param_stddev_number & operator=(const prevariable &)
Definition: model11.cpp:417
void allocate(void)
Definition: admodel.h:2260
static int num_likeprof_params
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: admodel.h:2259