[ADMB Users] admb re gammln
John Sibert
sibert at hawaii.edu
Tue Aug 10 17:02:07 PDT 2010
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
>>
--
John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Visit the ADMB project http://admb-project.org/
More information about the Users
mailing list