[ADMB Users] Having trouble with this; segmenataion fault

Steve Martell SteveM at iphc.int
Mon Dec 8 10:40:30 PST 2014


John,

This works for me:


DATA_SECTION

PARAMETER_SECTION
        init_number dum;

        objective_function_value f;
        random_effects_vector re(1,3);

PROCEDURE_SECTION

        df1b2variable x = 2.;
        alogit(x);

GLOBALS_SECTION
        template <typename SCALAR> SCALAR alogit(const SCALAR& a)
         {
            SCALAR p = 1.0/(1.0+exp(-a));
            return p;
         }
         // template df1b2variable alogit(const df1b2variable& a);




> On Dec 8, 2014, at 9:25 AM, John Sibert <sibert at hawaii.edu> wrote:
>
>  template <typename SCALAR> SCALAR alogit(const SCALAR& a)
>  {
>     SCALAR p = 1.0/(1.0+exp(-a));
>     return p;
>  }
>  template df1b2variable alogit(const df1b2variable& a);
>
> --
> John Sibert
> Emeritus Researcher, SOEST
> University of Hawaii at Manoa
> Honolulu HI (GMT-10)
> 808-294-3842 (mobile)
>
> Visit the ADMB project http://admb-project.org/
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users


________________________________

This internet e-mail message, and any files transmitted with it, contains confidential, privileged information that is intended only for the addressee. If you have received this e-mail message in error, please call us at (206) 634-1838 collect if necessary) and ask to speak to the message sender. Nothing in this e-mail or the act of transmitting it, is to be construed as a waiver of any rights or privileges enjoyed by the sender or the International Pacific Halibut Commission pursuant to the International Organizations Immunities Act, 22 U.S.C. Sec. 288 et seq.


More information about the Users mailing list