[ADMB Users] Question about R2admb

dave fournier davef at otter-rsch.com
Sun Mar 30 11:06:48 PDT 2014

I'm not sure exaclty what is wanted, but it does suggest  that one may 
want something like the following function
which I suppose could get added to ADMB in some form.

It should be

                        a if x<=c-e
            f(x) =
                        b if x>=c+e


          f is nice for c-e<x<c+e

this can be done with a cubic spline.   A nice way is to
declare a class to hold the necessary information and a function object 
or functor
to evaluate the function .  It could be extended to deal with more 
general boundary


with a bit of care.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: spline.cpp
Type: text/x-c++src
Size: 1285 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20140330/8503d8bc/attachment.cpp>

More information about the Users mailing list