[ADMB Users] df1b2variable/prevariable operator

Steve Martell s.martell at fisheries.ubc.ca
Tue Jul 12 10:48:41 PDT 2011


My recollection from the Developers meeting is that RETURN_ARRAYS_INCREMENT(); and ..._DECREMENT(); only had to be used with dvariables, not required for random effects variables.

S
On 2011-07-12, at 10:45 AM, Mollie Brooks wrote:

> Is it ok to use 
>   RETURN_ARRAYS_INCREMENT();
> and   RETURN_ARRAYS_DECREMENT();
> in all versions?
> 
> If not, what exactly is the rule for when to and when not to use these? 
> thanks,
> Mollie
> 
> 
> 
> On 12 Jul 2011, at 9:33 AM, dave fournier wrote:
> 
>> 
>> This is the right way to do this I think.
>> 
>> 
>> double Michaelis_Menten1( double x,  const double a,  const double b)
>> {
>>   double y;
>>   y=a*x/(b+x);
>>   return (y);
>> }
>> dvariable Michaelis_Menten1(double x,  const prevariable& a,  const prevariable& b)
>> {
>>   RETURN_ARRAYS_INCREMENT();
>>   dvariable y;
>>   y=a*x/(b+x);
>> 
>>   RETURN_ARRAYS_DECREMENT();
>>   return (y);
>> }
>> 
>> 
>> df1b2variable Michaelis_Menten1(double x,  const df1b2variable& a,  const df1b2variable& b)
>> {
>>  df1b2variable y;
>>   y=a*x/(b+x);
>>   return (y);
>> }
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>> 
> 
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110712/39ef8435/attachment.html>


More information about the Users mailing list