ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HollingII.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 HollingII(const double& x, const prevariable& alpha, const prevariable& h)
15 {
17  dvariable y;
18  y=alpha*x/(1.0+alpha*(h*x));
19 
21  return (y);
22 }
30 dvar_vector HollingII(const dvector& x, const prevariable& alpha, const prevariable& h)
31 {
33  dvar_vector y;
34  y=elem_div(alpha*x, 1.0+alpha*(h*x));
35 
37  return (y);
38 }
46 dvar_vector HollingII(const dvector& x, const dvar_vector& alpha, const prevariable& h)
47 {
49  dvar_vector y;
50  y=elem_div(elem_prod(alpha,x), 1.0+elem_prod(alpha, (h*x)));
51 
53  return (y);
54 }
55 /*---------------------------------------------2nd variable is a vector*/
63 dvar_vector HollingII(const dvector& x, const prevariable& alpha, const dvar_vector& h)
64 {
66  dvar_vector y;
67  y=elem_div(alpha*x, 1.0+alpha*elem_prod(h,x));
68 
70  return (y);
71 }
79 dvar_vector HollingII(const dvector& x, const dvar_vector& alpha, const dvar_vector& h)
80 {
82  dvar_vector y;
83  y=elem_div(elem_prod(alpha,x), 1.0+elem_prod(alpha, elem_prod(h,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 HollingII(const double& x, const df1b2variable& alpha, const df1b2variable& h)
98 {
99  df1b2variable y;
100  y=alpha*x/(1.0+alpha*(h*x));
101 
102  return (y);
103 }
111 df1b2vector HollingII(const dvector& x, const df1b2variable& alpha, const df1b2variable& h)
112 {
113  df1b2vector y;
114  y=elem_div(alpha*x, 1.0+alpha*(h*x));
115 
116  return(y);
117 }
125 df1b2vector HollingII(const dvector& x, const df1b2vector& alpha, const df1b2variable& h)
126 {
127  df1b2vector y;
128  y=elem_div(elem_prod(alpha,x), 1.0+elem_prod(alpha, (h*x)));
129 
130  return(y);
131 }
132 
133 /*---------------------------------------------2nd variable is a vector in a random effects model*/
134 /*----------------------1st varible contains random effects*/
142 df1b2vector HollingII(const dvector& x, const df1b2variable& alpha, const df1b2vector& h)
143 {
144  df1b2vector y;
145  y=elem_div(alpha*x, 1.0+alpha*elem_prod(h,x));
146 
147  return(y);
148 }
156 df1b2vector HollingII(const dvector& x, const df1b2vector& alpha, const df1b2vector& h)
157 {
158  df1b2vector y;
159  y=elem_div(elem_prod(alpha,x), 1.0+elem_prod(alpha, elem_prod(h,x)));
160 
161  return(y);
162 }
163 
Base class for dvariable.
Definition: fvar.hpp:1315
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
d3_array elem_div(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements division of a(i, j, k) / b(i, j, k).
Definition: d3arr2a.cpp:112
ADMB variable vector.
Definition: fvar.hpp:2172
Description not yet available.
Definition: df1b2fun.h:266
Description not yet available.
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
dvariable HollingII(const double &x, const prevariable &alpha, const prevariable &h)
HollingII scalar.
Definition: HollingII.cpp:14