[ADMB Users] Invoking library qfclib.h
CHRIS GRANDIN
cgrandin at shaw.ca
Tue May 21 10:57:47 PDT 2013
First off, take the #include "qfclib.h" out, it isn't needed. The TPL parser automatically inserts #include <contrib.h> which itself includes qfclib. Once you've done that repost the errors.
Chris
----- Original Message -----
From: "John Sibert" <sibert at hawaii.edu>
To: "Cliff G Rice (DFW)" <Clifford.Rice at dfw.wa.gov>
Cc: users at admb-project.org
Sent: Thursday, May 16, 2013 6:08:21 PM
Subject: Re: [ADMB Users] Invoking library qfclib.h
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
_______________________________________________
Users mailing list
Users at admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
More information about the Users
mailing list