ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
df1b2-separable/bounder.cpp
Go to the documentation of this file.
1 
5 #include "df1b2fun.h"
6 
14 df1b2variable bounder(const df1b2variable& x,double min,double max,
15  double scale)
16 {
17  df1b2variable y=x/scale;
18  df1b2variable z;
19  if (value(y)<20.0)
20  {
21  z=exp(y)/(1.0+exp(y));
22  }
23  else
24  {
25  z=1.0/(1+exp(-y));
26  }
27  return min+(max-min)*z;
28 }
#define x
Description not yet available.
Definition: df1b2fun.h:266
double bounder(double x, double min, double max, double scale)
Description not yet available.
#define min(a, b)
Definition: cbivnorm.cpp:188
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Definition: d3arr2a.cpp:28
Description not yet available.
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
#define max(a, b)
Definition: cbivnorm.cpp:189