expose_stan_functions rewrite

19 views
Skip to first unread message

Bob Carpenter

unread,
Jul 21, 2016, 1:04:01 PM7/21/16
to stan...@googlegroups.com
I still have a to-do item to write a file with proper versions
of these defined in terms of double inputs that just call the
templated versions.

- Bob

> On Jul 21, 2016, at 10:56 AM, Ben Goodrich <goodri...@gmail.com> wrote:
>
> On Thursday, July 21, 2016 at 7:55:38 AM UTC-4, Sebastian Weber wrote:
> I was wondering if in the following user-specified function call what the final type of variable c will be:
>
> User-defined functions are templated in the C++ code (except for int) and there is a lot of type promotion. That is the main reason why expose_stan_functions() is so brittle since it has to rewrite everything to only accept doubles from R rather than vars.
>
> Ben
>
>
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ben Goodrich

unread,
Jul 21, 2016, 3:53:55 PM7/21/16
to stan development mailing list
On Thursday, July 21, 2016 at 1:04:01 PM UTC-4, Bob Carpenter wrote:
I still have a to-do item to write a file with proper versions
of these defined in terms of double inputs that just call the
templated versions.

This is related to https://github.com/stan-dev/stan/wiki/Functionals-spec which I put on the agenda to discuss more the last few meetings but it has been a while since we were both at the same meeting. If user-defined functions were defined by the class, then we might not really need expose_stan_functions() if we can just expose them like we do log_prob().

Ben

Reply all
Reply to author
Forward
0 new messages