[ADMB Users] admb re gammln

Anders Nielsen anders at nielsensweb.org
Wed Aug 11 01:05:33 PDT 2010


Hi John and others, 

I know it is not in the trunk for df1b2vector, and that is 
why I suggested the simple workaround. I think it should be 
there because it is there for dvar_vector. For the user that 
means that currently when you have a working model without 
random effects that uses the vector version of gammln, and 
then tries to introduce a random effect, then you get an error. 

I have added to the trunk just now. 

The Danish summer was pretty good this year, but it is sadly 
starting to fade.   

Cheers, 

Anders. 

On Tue, 2010-08-10 at 14:02 -1000, John Sibert wrote:
> Hi Anders,
> It looks like this overload of gammln is not in the svn trunk. Derek has 
> completed implementing replacement code for all of the gamma function 
> related functions to be found in the trunk.
> 
> Does he need to include an additional overload for df1b2vector 
> gammln(const df1b2vector&    z) as well?
> 
> Hope you are enjoying the Danish summer.
> Cheers,
> John
> 
> On 08/09/2010 03:29 AM, Anders Nielsen wrote:
> > Hi,
> >
> > Sorry to respond this late, but I have been on vacation.
> >
> > Aparently the gammln is there, but not for the vector case, so
> > a quick fix is to add a GLOBALS_SECTION like below:
> >
> > GLOBALS_SECTION
> >    #include<df1b2fun.h>
> >
> >    df1b2vector gammln(const df1b2vector&  z){
> >      int from=z.indexmin();
> >      int to=z.indexmax();
> >      df1b2vector ret(from,to);
> >      for(int i=from; i<=to; ++i){
> >        ret(i)=gammln(z(i));
> >      }
> >      return(ret);
> >    }
> >
> > A complete test case is attached.
> >
> > Unless there are big objections I will add the function to ADMB.
> >
> > Cheers,
> >
> > Anders.
> >
> >
> >
> >
> > On Thu, 2010-08-05 at 10:40 -0700, Mark Maunder wrote:
> >    
> >> Does anyone know if gammln has been implemented in admb-re?
> >>      
> >>
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at admb-project.org
> >> http://lists.admb-project.org/mailman/listinfo/users
> >>      
> 




More information about the Users mailing list