[ADMB Users] df1b2variable operator - ( ) not for double value
Weihai Liu
liuweih at msu.edu
Fri Jul 15 12:23:08 PDT 2011
Hi there,
One of our postdr here raised a question lately, in his model, he want to
use df1b2variable operator - (const df1b2variable& x,double y); and I found
out these being commented out in df1b2fun.h,
//df1b2variable operator - (double x, const df1b2variable& y);
//df1b2variable operator - (const df1b2variable& x, double y);
So is there anyone can explain why these are being commented out and not
being implemented in admb, if it was just forgot, then I will
first uncomment out the above two lines in df1b2fun.h, then add the
following two inline functions after that in the same file , these basically
called one of already defined operator+().
inline df1b2variable operator - (double x, const df1b2variable& y) {return
x+(-1.*y);}
inline df1b2variable operator - (const df1b2variable& x,double y) {return
(-1.*y)+x;}
This update was build fine on my side, and I don't have writable access to
svn, so someone will help on this. Thanks
--
Weihai Liu
~~~~~~~~~~~~~~~~~~~~~~~~
Quantitative Fisheries Center
Department of Fisheries & Wildlife
Michigan State University
153 Giltner Hall
East Lansing, MI 48824
Phone: 517-355-0126
Email: liuweih at msu.edu
~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110715/f6f7f9d9/attachment.html>
More information about the Users
mailing list