ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
model5.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
7 #include <admodel.h>
8 
10  const int& ii, const dvariable& _pen)
11  {
12  dvariable& pen= (dvariable&) _pen;
14  {
15  set_value_mc(*this,x,ii,minb,maxb);
16  }
17  else
18  {
19  ::set_value(*this,x,ii,minb,maxb,pen);
20  }
21  dvariable s=mean(*this);
22  pen+=10000.0*s*s;
24  {
25  (*this)-=s;
26  }
27  }
#define x
ADMB variable vector.
Definition: fvar.hpp:2172
double mean(const dvector &vec)
Returns computed mean of vec.
Definition: cranfill.cpp:43
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
Definition: model5.cpp:9
Description not yet available.
void set_value_mc(const dvar_vector &x, const dvar_vector &v, const int &ii, const double fmin, const double fmax)
Definition: mod_mc3.cpp:152
static int mc_phase
Definition: admodel.h:846
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518