-
-
Notifications
You must be signed in to change notification settings - Fork 47
add signatures for reverse #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is the C++ code general enough to reverse an arbitrary |
Yes, it should be, but I don't know how to express it in signature form. |
In the functions manual, it'll just be
T[] reverse(T[] x)
I don't know if stanc3 makes this easier, but in the old compiler, we just did a loop over base types and array dimensions and added all the signatures up to a fixed depth.
… On Jan 30, 2020, at 3:55 PM, Marco Colombo ***@***.***> wrote:
Yes, it should be, but I don't know how to express it in signature form.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Should be fairly easy to add this in stanc3. Will make a PR once the release stuff settles. |
This is still active? I just missed this neat function when writing the COVID model. Not urgent at all... just bumping (but @rok-cesnovar is probably busy with lots of other stuff which I throw at him - sorry). |
In stan-dev/math#1650 I added the implementation of reverse. We should expose the following signatures:
The text was updated successfully, but these errors were encountered: