[ADMB Users] Invoking library qfclib.h

John Sibert sibert at hawaii.edu
Thu May 16 18:08:21 PDT 2013


What are you trying to do?

Both round(rgamma(2.5,2.5,rnd),3) and round(rdirichlet(p,rnd),2) parse 
into two arguments to the function double round(double).


John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Honolulu HI (GMT-10)
808-294-3842

Visit the ADMB project http://admb-project.org/

On 05/16/2013 10:43 AM, Rice, Cliff G (DFW) wrote:
>
> I’m trying to use the rounding function described in qfc_sim.cpp 
> <http://admb-project.org/svn/trunk/contrib/qfclib/qfc_sim.cpp>. 
> (http://admb-project.org/svn/trunk/contrib/qfclib/qfc_sim.cpp)
>
> I have tried the test file 
> <http://admb-project.org/svn/trunk/contrib/qfclib/tests/testfunction.tpl>. 
> (http://admb-project.org/svn/trunk/contrib/qfclib/tests/testfunction.tpl)
>
> This file includes the command
>
> #include "qfclib.h" in the GLOBALS_SECTION
>
> However, when compiling, I receive the errors:
>
> error: too many arguments to function 'double round(double)' evidently 
> for round(rgamma(2.5,2.5,rnd),3) [line 22]
>
> and
>
> error: cannot convert 'dvector' to 'double' for argument '1' to 
> 'double round(double)' for round(rdirichlet(p,rnd),2) [line 23]
>
> among others.
>
> These errors are exactly those produced if the include statement is 
> absent.
>
> Judging from statements in qfc_sim.cpp:
>
> * 5. round your matrix, vector, sclar to some specific decimals for 
> display
>
> * in report_section, such as round(dmatrix,4), see round() \n
>
> Evidently I’m missing something.
>
> Thanks,
>
> Cliff Rice
>
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users





More information about the Users mailing list