[Developers] FW: patch admodel.h?
Mark Maunder
mmaunder at iattc.org
Tue Feb 22 21:19:10 PST 2011
Has anyone done this or put it on a to do list?
-----Original Message-----
From: users-bounces at admb-project.org [mailto:users-bounces at admb-project.org] On Behalf Of Poos, Jan Jaap
Sent: Monday, February 21, 2011 1:29 AM
To: users at admb-project.org
Subject: [ADMB Users] patch admodel.h?
Hi,
I hope one of the lead developers of ADMB can help me to patch the source code. The patch solves an issue I have with creating vectors of likelihood profile variables. The problem has been discussed on this list before. I was under the impression the problem would be fixed in the 10.0 version of ADMB but something must have gone wrong.
The problem is that in admodel.h some members are private where it would be convenient if they were public:
.../admodel.h:2104:5: error: 'param_likeprof_number::param_likeprof_number()' is private
spline_and_spline_F_in_time.cpp:15:62: error: within this context
.../admodel.h:2097:10: error: 'void param_likeprof_number::allocate(const char*)' is private
spline_and_spline_F_in_time.cpp:20:39: error: within this context
I used the admodel.h code from a svn update done today from the googlecode repository to create the patch below (I am guessing an attached file will be scrubbed). If this is not the most recent admodel.h file, I hope one of the developers can send me the latest version of admodel.h. As you can see the patch is really small (just moving the two culprit members to the public section of the class definition). This way I hope I can make a contribution that doesn't get lost with the minimum of effort (that is greatly appreciated) from the developers side.
Kind regards,
Jan Jaap
--- admodel.h.old 2011-02-21 10:50:50.000000000 +0100
+++ admodel.h 2011-02-21 10:53:07.000000000 +0100
@@ -2094,16 +2094,16 @@
public likeprof_params
{
double sigma;
- void allocate(const char *s="UNNAMED");
virtual int size_count(void); // get the number of active parameters
virtual const char * label(void);
virtual double& get_sigma(void){return sigma;}
virtual double get_value(void){return value(*this);}
//void copy_value_to_vector(BOR_CONST dvector& x,BOR_CONST int& ii);
virtual dvariable variable(void){ return dvariable(*this);}
- param_likeprof_number();
friend class model_parameters;
public:
+ void allocate(const char *s="UNNAMED");
+ param_likeprof_number();
param_likeprof_number& operator = (_CONST prevariable&);
param_likeprof_number& operator = (CGNU_DOUBLE);
};
_______________________________________________
Users mailing list
Users at admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
More information about the Developers
mailing list