[ADMB Users] df1b2variable/prevariable operator

Steve Martell s.martell at fisheries.ubc.ca
Mon Jul 11 11:45:28 PDT 2011

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.
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)
> {
> 	df1b2variable y;
> 	y=a*x/(b+x);
>    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

More information about the Users mailing list