<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/13/2014 03:26 PM, Mark Maunder
wrote:<br>
</div>
<blockquote
cite="mid:339913E1960AE142A9373DFCD849F3DA4C60E50D@mail1.lajolla.iattc.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So
we need a copy constructor defined for a double to a
prevariable. We probably also need a copy constructor
defined for an int to a prevariable<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What
about a dvector[1], an ivector[1], or higher dimensions to a
prevariable?
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Then
we could define the library functions as prevariables. Are
there any disadvantages to this?</span></p>
</div>
</blockquote>
<br>
It will wreck everything immediately. The point of prevariables is
that they have no nontrival destructor.<br>
<br>
the only correct way to "make" a prevariable is to do something
like x[i] where x is a dvar_vector.<br>
<blockquote
cite="mid:339913E1960AE142A9373DFCD849F3DA4C60E50D@mail1.lajolla.iattc.org"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Mark<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
William Stockhausen - NOAA Federal
[<a class="moz-txt-link-freetext" href="mailto:william.stockhausen@noaa.gov">mailto:william.stockhausen@noaa.gov</a>]
<br>
<b>Sent:</b> Wednesday, August 13, 2014 1:46 PM<br>
<b>To:</b> Mark Maunder<br>
<b>Cc:</b> Steve Martell; <a class="moz-txt-link-abbreviated" href="mailto:developers@admb-project.org">developers@admb-project.org</a><br>
<b>Subject:</b> Re: [Developers] libraries of functions<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I think dvariable works with a double
because it has a "copy constructor" defined for a double (so
you can do something like "dvariable dv(0.124);" in your
code. The compiler knows how to convert a double to a
dvariable when you pass a double as the 1st input to
Richards(const dvariable&,...) [note that your code
calling this function w/ a double wouldn't compile if you
didn't have the "const" there because c++ only constructs
temporary variables (the resulting dvariable) when they are
declared consts (and thus don't modify them in the function
body)]. Passing a double as 1st input to Richards(const
prevariable&,...) wouldn't work because prevariable
doesn't have a copy constructor defined for a double, so the
compiler doesn't know how to convert a double to a temporary
prevariable&. Passing a dvariable to the latter function
is no problem because a dvariable is already a prevariable
because it's a derived class of prevariable.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Where you'll get in trouble with
Richards(const dvariable&,...) is when you try
Richards(dvarvector[1],...) where dvarvector is a
dvar_vector, because the operation dvarvector[1] returns a
prevariable, not a dvariable! You're also out of luck
with dvar3_array(i,j) [returns a prevariable] and I
suspect most/all of the dvar array operations that return
a single element.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Buck<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-family:"Courier New"">***************************************************<br>
* Dr. William T. Stockhausen *<br>
***************************************************<br>
* Resource Ecology and Fisheries Management *<br>
* Alaska Fisheries Science Center *<br>
* National Marine Fisheries Service *<br>
* National Oceanic and Atmospheric Administration *<br>
* 7600 Sand Point Way N.E. *<br>
* Seattle, Washington 98115-6349 *<br>
***************************************************<br>
* email: <a moz-do-not-send="true"
href="mailto:William.Stockhausen@noaa.gov"
target="_blank">William.Stockhausen@noaa.gov</a>
*<br>
* voice: 206-526-4241 fax: 206-526-6723 *<br>
* web : <a moz-do-not-send="true"
href="http://www.afsc.noaa.gov" target="_blank">http://www.afsc.noaa.gov</a>
*<br>
***************************************************<br>
All models are wrong, some are useful.--G.E.P. Box<br>
Beware of geeks bearing equations. --W. Buffett<br>
***************************************************<br>
Disclaimer: The opinions expressed above are personal
<br>
and do not necessarily reflect official NOAA policy.<br>
<br>
</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Aug 13, 2014 at 9:45 AM, Mark
Maunder <<a moz-do-not-send="true"
href="mailto:mmaunder@iattc.org" target="_blank">mmaunder@iattc.org</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks
Buck.</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However
dvariable works for a double but a
</span>prevariable does not (nor does a <span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">named_dvariable,
whatever that is)</span>. The error I get using
prevariables is<o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">no
matching function for call to
'Richards(double&, named_dvariable&,
named_dvariable&, param_init_number&,
named_dvariable&)</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
William Stockhausen - NOAA Federal [mailto:<a
moz-do-not-send="true"
href="mailto:william.stockhausen@noaa.gov"
target="_blank">william.stockhausen@noaa.gov</a>]
<br>
<b>Sent:</b> Tuesday, August 12, 2014 1:59 PM<br>
<b>To:</b> Mark Maunder<br>
<b>Cc:</b> Steve Martell; <a moz-do-not-send="true"
href="mailto:developers@admb-project.org"
target="_blank">
developers@admb-project.org</a></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<b>Subject:</b> Re: [Developers] libraries of
functions<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If
you redefine all the dvariables in the function
signature as prevariables, you may be ok (as
long as you don't try passing in a double, which
the last error in your error output seems to be
indicating). This is because (if I followed
things correctly in the online documentation):<o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
param_init_number inherits from
named_dvariable, which inherits from
dvariable, which inherits from prevariable. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">which
you can partly see from the "Class Hierarchy"
entry regarding prevariable on the online
documentation (although param_init_number is
missing). It would be a nice feature in the
documentation if you could see the class
hierarchy tree starting from the most-derived
(param_init_number, in this case) to the base
class(es).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Buck<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br
clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span
style="font-family:"Courier
New"">***************************************************<br>
* Dr. William T. Stockhausen
*<br>
***************************************************<br>
* Resource Ecology and Fisheries
Management *<br>
* Alaska Fisheries Science Center
*<br>
* National Marine Fisheries Service
*<br>
* National Oceanic and Atmospheric
Administration *<br>
* 7600 Sand Point Way N.E.
*<br>
* Seattle, Washington 98115-6349
*<br>
***************************************************<br>
* email: <a moz-do-not-send="true"
href="mailto:William.Stockhausen@noaa.gov"
target="_blank">William.Stockhausen@noaa.gov</a>
*<br>
* voice: <a moz-do-not-send="true"
href="tel:206-526-4241" target="_blank">206-526-4241</a>
fax: <a moz-do-not-send="true"
href="tel:206-526-6723" target="_blank">
206-526-6723</a> *<br>
* web : <a moz-do-not-send="true"
href="http://www.afsc.noaa.gov"
target="_blank">http://www.afsc.noaa.gov</a>
*<br>
***************************************************<br>
All models are wrong, some are
useful.--G.E.P. Box<br>
Beware of geeks bearing equations. --W.
Buffett<br>
***************************************************<br>
Disclaimer: The opinions expressed above
are personal <br>
and do not necessarily reflect official
NOAA policy.</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On
Tue, Aug 12, 2014 at 12:51 PM, Mark Maunder
<<a moz-do-not-send="true"
href="mailto:mmaunder@iattc.org"
target="_blank">mmaunder@iattc.org</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Any
comments on the use of templates messing
up the various forms of dvariable and
the automatic translation between the
different forms of dvariable (sorry for
not using the right terminology). I
think the beneficial use of templates
for functions in ADMB might be a
redherring.</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Mark</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid
#B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a moz-do-not-send="true"
href="mailto:developers-bounces@admb-project.org"
target="_blank">developers-bounces@admb-project.org</a>
[mailto:<a moz-do-not-send="true"
href="mailto:developers-bounces@admb-project.org"
target="_blank">developers-bounces@admb-project.org</a>]
<b>On Behalf Of </b>Steve Martell<br>
<b>Sent:</b> Tuesday, August 12,
2014 12:46 PM<br>
<b>To:</b> William Stockhausen -
NOAA Federal<br>
<b>Cc:</b> <a
moz-do-not-send="true"
href="mailto:developers@admb-project.org"
target="_blank">developers@admb-project.org</a></span><o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<b>Subject:</b> Re: [Developers]
libraries of functions<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">My
bad
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Should
have been <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">FUNCTION
dvariable Richards(...)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">S<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On
Aug 12, 2014, at 12:40 PM,
William Stockhausen - NOAA
Federal <<a
moz-do-not-send="true"
href="mailto:william.stockhausen@noaa.gov"
target="_blank">william.stockhausen@noaa.gov</a>>
wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
don't think your suggestion will
work, Steve (he said without
having tried it). If I
understand things correctly
(going out on a looong limb
here), "FUNCTION" is an
identifier to the tpl2cpp
translator that what follows is
a function that 1) whose
signature should be added to the
model_parameters class
declaration in tpl_name.htp and
2) whose implementation should
be added to tpl_name.cpp.
<o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">A
nice (but probably tough to
implement) feature in tpl2cpp
would be the ability to put
the following:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">FUNCTION
dvariable
model_parameters::Richards(const
dvariable &age, const
dvariable &Linf, const
dvariable &K, const
dvariable &t0, const
dvariable &p)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
dvariable
Length=Linf*pow((1+(1/p)*exp(-K*(age-t0))),-p);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
return(Length);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">into
a file (functions.cxx, say)
and be able to "include" that
text in the tpl you're
converting to cpp at a stage
in the process before
FUNCTIONs get converted to cpp
equivalents. If such a feature
is currently available, I
haven't found it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Buck<o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, Aug
11, 2014 at
3:59 PM, Steve
Martell <<a
moz-do-not-send="true" href="mailto:martell.steve@gmail.com"
target="_blank">martell.steve@gmail.com</a>>
wrote:<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<blockquote
style="border:none;border-left:solid
#CCCCCC 1.0pt;padding:0in
0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Try:
<o:p></o:p></p>
<div>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">FUNCTION
dvariable
model_parameters::Richards(const
dvariable
&age,
const
dvariable
&Linf,
const
dvariable
&K, const
dvariable
&t0, const
dvariable
&p)</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">{</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
{</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
dvariable
Length=Linf*pow((1+(1/p)*exp(-K*(age-t0))),-p);</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
return(Length);</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
}</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">}</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Aug 11,
2014, at 3:49 PM,
Mark Maunder <<a
moz-do-not-send="true" href="mailto:mmaunder@iattc.org" target="_blank">mmaunder@iattc.org</a>>
wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Why
do I get an
error if I put
the following
function in
the file
CAPAM_Growth.hpp
and include it
using
#include<CAPAM_Growth.hpp>
but if I put
it in the tpl
using the
FUNCTION
section I do
not? The
translator
appears to
just put it in
the cpp with
no changes</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">dvariable
model_parameters::Richards(const
dvariable
&age,
const
dvariable
&Linf,
const
dvariable
&K, const
dvariable
&t0, const
dvariable
&p)</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">{</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
{</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
dvariable
Length=Linf*pow((1+(1/p)*exp(-K*(age-t0))),-p);</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
return(Length);</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
}</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">}</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The
errors I get
are</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">In
file included
from
igm.cpp:3:0:</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">./CAPAM_Growth.hpp:130:142:
error: invalid
use of
incomplete
type 'struct
model_parameters'</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">c:/ADMB/admb101-gcc452-win32\include/admodel.h:107:9:
error: forward
declaration of
'struct
model_parameters'</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">igm.cpp:
In member
function
'virtual void
model_parameters::userfunction()':</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">igm.cpp:127:46:
error: no
matching
function for
call to
'Richards(prevariable,
named_dvariable&,
named_dvariable&,
param_init_number&,
named_dvariable&)'</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">igm.cpp:128:58:
error: no
matching
function for
call to
'Richards(prevariable&,
named_dvariable&,
named_dvariable&,
param_init_number&,
named_dvariable&)'</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">igm.cpp:139:49:
error: no
matching
function for
call to
'Richards(double&,
named_dvariable&,
named_dvariable&,
param_init_number&,
named_dvariable&)'</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The
selectivity special
issue of the
journal
Fisheries
Research is
now published</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a
moz-do-not-send="true"
href="http://www.sciencedirect.com/science/journal/01657836/158/supp/C"
target="_blank">http://www.sciencedirect.com/science/journal/01657836/158/supp/C</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:6.0pt;background:white">
<span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The
Stock
Synthesis
special issue
of the journal
Fisheries
Research</span><o:p></o:p></p>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:6.0pt;background:white">
<span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a
moz-do-not-send="true"
href="http://www.sciencedirect.com/science/journal/01657836/142"
target="_blank">http://www.sciencedirect.com/science/journal/01657836/142</a></span><o:p></o:p></p>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Mark
Maunder </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Head
of the Stock
Assessment
Program </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""
lang="ES-PE">Inter-American
Tropical Tuna
Commission </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""
lang="ES-TRAD">8901
La Jolla
Shores Dr.</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""
lang="ES-TRAD">La
Jolla, CA
92037-1508,
USA</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""
lang="ES-PE"> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Tel:
<a
moz-do-not-send="true"
href="tel:%28858%29%20546-7027" target="_blank">(858) 546-7027</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Fax:
<a
moz-do-not-send="true"
href="tel:%28858%29%20546-7133" target="_blank">(858) 546-7133</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a
moz-do-not-send="true" href="mailto:mmaunder@iattc.org" target="_blank">mmaunder@iattc.org</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a
moz-do-not-send="true"
href="http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder"
target="_blank">http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Visit
the Center for
the
Advancement of
Population
Assessment
Methodology at</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a
moz-do-not-send="true" href="http://www.capamresearch.org/"
target="_blank">http://www.capamresearch.org/</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Visit
the AD Model
Builder
project at</span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <a
moz-do-not-send="true" href="http://admb-project.org/" target="_blank">http://admb-project.org/</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">See
the following
website for
information on
fisheries
stock
assessment <a
moz-do-not-send="true" href="http://www.fisheriesstockassessment.com/"
target="_blank">http://www.fisheriesstockassessment.com/</a></span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><o:p></o:p></p>
</div>
</div>
<div>
<p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:13.5pt;font-family:"Helvetica","sans-serif";color:#888888"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:13.5pt;font-family:"Helvetica","sans-serif";color:#888888">-- <br>
You received
this message
because you are
subscribed to
the Google
Groups
"admb-users"
group.<br>
To unsubscribe
from this group
and stop
receiving emails
from it, send an
email to <a
moz-do-not-send="true"
href="mailto:admb-users+unsubscribe@googlegroups.com" target="_blank"><span
style="color:purple">admb-users+unsubscribe@googlegroups.com</span></a>.<br>
To post to this
group, send
email to <a
moz-do-not-send="true"
href="mailto:admb-users@googlegroups.com" target="_blank"><span
style="color:purple">admb-users@googlegroups.com</span></a>.<br>
Visit this group
at <a
moz-do-not-send="true"
href="http://groups.google.com/group/admb-users" target="_blank"><span
style="color:purple">http://groups.google.com/group/admb-users</span></a>.<br>
For more
options, visit <a
moz-do-not-send="true" href="https://groups.google.com/d/optout"
target="_blank"><span
style="color:purple">https://groups.google.com/d/optout</span></a>.</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
_______________________________________________<br>
Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br>
<a moz-do-not-send="true"
href="http://lists.admb-project.org/mailman/listinfo/developers"
target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">_______________________________________________<br>
Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:Developers@admb-project.org"
target="_blank">Developers@admb-project.org</a><br>
<a moz-do-not-send="true"
href="http://lists.admb-project.org/mailman/listinfo/developers"
target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div class="MsoNormal"
style="text-align:center"
align="center">
<hr align="center" size="3"
width="100%">
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray"><br>
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
<a moz-do-not-send="true"
href="tel:%28206%29%20634-1838"
target="_blank">(206) 634-1838</a>
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.</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Developers@admb-project.org">Developers@admb-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/developers">http://lists.admb-project.org/mailman/listinfo/developers</a>
</pre>
</blockquote>
<br>
</body>
</html>