ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mfupper.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  */
11 #include <fvar.hpp>
12 
18  {
19  if (x<=M)
20  {
21  return x;
22  }
23  else
24  {
25  fpen+=square(x-M);
26  return M+(1.+2.*(x-M))/(1.+x-M);
27  }
28  }
Base class for dvariable.
Definition: fvar.hpp:1315
#define x
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
#define M
Definition: rngen.cpp:57
dvariable mf_upper_bound(const prevariable &x, double M, prevariable &fpen)
Description not yet available.
Definition: mfupper.cpp:17
double square(const double value)
Return square of value; constant object.
Definition: d3arr4.cpp:16
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518