[ADMB Users] df1b2variable/prevariable operator

Mollie Brooks mbrooks at ufl.edu
Mon Jul 11 12:01:48 PDT 2011


Weihai said
> df1b2variables for random effect model, any variable defined in parameter_section by default use df1b2variables. 
> 
> for non random effect, any variable in parameter_section refer to prevariable. So I don't think regular user will have a chance to use both of them at the same time in admb. 



On 11 Jul 2011, at 2:45 PM, Steve Martell wrote:

> Mollie you could check other functions in the source code that return df1b2variable and see if you can mix df1b2variable and prevariable.  My recollections is that you would have to have both df1b2variable in your example below.
> S
> On 2011-07-11, at 10:48 AM, Mollie Brooks wrote:
> 
>> There seems to be no operator defined for dividing a df1b2variable by a prevariable. Should I create a new df1b2variable and set it equal to the prevariable denominator? 
>> 
>> Will this operator eventially get defined? Should I add it as a feature request?
>> 
>> thanks,
>> Mollie
>> 
>> Details...
>> This is the function I'm trying to write:
>> 
>> df1b2variable Michaelis_Menten1(const double& x,  const df1b2variable& a,  const prevariable& b)
>> {
>>   RETURN_ARRAYS_INCREMENT();	
>> 	df1b2variable y;
>> 	y=a*x/(b+x);
>> 
>> 	RETURN_ARRAYS_DECREMENT();	
>>   return (y);
>> }
>> 
>> When I try to use it, I get the following error
>> 
>> In function 'df1b2variable Michaelis_Menten1(const double&, const df1b2variable&, const prevariable&)':
>> ./Michaelis_Menten1.cpp:62: error: no match for 'operator/' in 'operator*(const df1b2variable&, double)(x) / operator+(((const prevariable&)((const prevariable*)b)), x)
>> 
>> I believe the relevant candidates are:
>> 
>> df1b2variable operator/(double, const df1b2variable&)
>> df1b2variable operator/(const df1b2variable&, double)
>> df1b2variable operator/(const df1b2variable&, const df1b2variable&)
>> _______________________________________________
>> 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/20110711/1f4d187f/attachment.html>


More information about the Users mailing list