ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
monomolecular.cpp
Go to the documentation of this file.
1 #include <admodel.h>
2 #include <df1b2fun.h>
3 #include <adrndeff.h>
4 
5 
6 /*---------------------------------------------2nd variable is a scalar*/
14 dvariable monomolecular(const double& x, const prevariable& a, const prevariable& b)
15 {
17  dvariable y;
18  y=a*(1.0-exp(-b*x));
19 
21  return (y);
22 }
31 {
33  dvar_vector y;
34  y=a*(1.0-exp(-b*x));
35 
37  return (y);
38 }
47 {
49  dvar_vector y;
50  y=elem_prod(a, 1.0-exp(-b*x));
51 
53  return (y);
54 }
55 /*---------------------------------------------2nd variable is a vector*/
64 {
66  dvar_vector y;
67  y=a*(1.0-exp(-1.0*elem_prod(b,x)));
68 
70  return (y);
71 }
80 {
82  dvar_vector y;
83  y=elem_prod(a, 1.0-exp(-1.0*elem_prod(b,x)));
84 
86  return (y);
87 }
88 /*---------------------------------------------2nd variable is a scalar in a random effects model*/
89 /*----------------------1st varible contains random effects*/
97 df1b2variable monomolecular(const double& x, const df1b2variable& a, const df1b2variable& b)
98 {
99  df1b2variable y;
100  y=a*(1.0-exp(-b*x));
101 
102  return (y);
103 }
112 {
113  df1b2vector y;
114  y=a*(1.0-exp(-b*x));
115 
116  return(y);
117 }
126 {
127  df1b2vector y;
128  y=elem_prod(a, 1.0-exp(-b*x));
129 
130  return(y);
131 }
132 
133 /*---------------------------------------------2nd variable is a vector in a random effects model*/
134 /*----------------------1st varible contains random effects*/
143 {
144  df1b2vector y;
145  y=a*(1.0-exp(-1.0*elem_prod(b,x)));
146 
147  return(y);
148 }
157 {
158  df1b2vector y;
159  y=elem_prod(a, 1.0-exp(-1.0*elem_prod(b,x)));
160 
161  return(y);
162 }
163 
Base class for dvariable.
Definition: fvar.hpp:1315
dvariable monomolecular(const double &x, const prevariable &a, const prevariable &b)
monomoleular function; scalar
d3_array elem_prod(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements product of a(i, j, k) * b(i, j, k).
Definition: d3arr2a.cpp:92
Description not yet available.
void RETURN_ARRAYS_DECREMENT(void)
Decrements gradient_structure::RETURN_ARRAYS_PTR.
Definition: gradstrc.cpp:507
#define x
Vector of double precision numbers.
Definition: dvector.h:50
Description not yet available.
Definition: df1b2fun.h:953
ADMB variable vector.
Definition: fvar.hpp:2172
Description not yet available.
Definition: df1b2fun.h:266
Description not yet available.
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.
void RETURN_ARRAYS_INCREMENT(void)
Increments gradient_structure::RETURN_ARRAYS_PTR.
Definition: gradstrc.cpp:474
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518