ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HollingIII.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 HollingIII(const double& x, const prevariable& a, const prevariable& b)
15 {
17  dvariable y;
18  y=a*pow(x,2)/(pow(b,2)+pow(x,2));
19 
21  return (y);
22 }
31 {
33  dvar_vector y;
34  y=a*elem_div(pow(x,2), pow(b,2)+pow(x,2));
35 
37  return (y);
38 }
47 {
49  dvar_vector y;
50  y=elem_prod(a, elem_div(pow(x,2), pow(b,2)+pow(x,2)));
51 
53  return (y);
54 }
55 /*---------------------------------------------2nd variable is a vector*/
64 {
66  dvar_vector y;
67  y=a*elem_div(pow(x,2), pow(b,2)+pow(x,2));
68 
70  return (y);
71 }
80 {
82  dvar_vector y;
83  y=elem_prod(a, elem_div(pow(x,2), pow(b,2)+pow(x,2)));
84 
86  return (y);
87 }
88 /*---------------------------------------------2nd variable is a scalar in a random effects model*/
89 /*----------------------1st varible contains random effects*/
97 df1b2variable HollingIII(const double& x, const df1b2variable& a, const df1b2variable& b)
98 {
99  df1b2variable y;
100  y=a*pow(x,2)/(pow(b,2)+pow(x,2));
101 
102  return (y);
103 }
112 {
113  df1b2vector y;
114  y=a*elem_div(pow(x,2), pow(b,2)+pow(x,2));
115 
116  return(y);
117 }
126 {
127  df1b2vector y;
128  y=elem_prod(a, elem_div(pow(x,2), pow(b,2)+pow(x,2)));
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*elem_div(pow(x,2), pow(b,2)+pow(x,2));
146 
147  return(y);
148 }
157 {
158  df1b2vector y;
159  y=elem_prod(a, elem_div(pow(x,2), pow(b,2)+pow(x,2)));
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
dvariable HollingIII(const double &x, const prevariable &a, const prevariable &b)
Holling Type III function; scalar.
Definition: HollingIII.cpp:14
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
d3_array pow(const d3_array &m, int e)
Description not yet available.
Definition: d3arr6.cpp:17