Skip to content
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

can we reorganize to put the constraint transforms into their own folder? #3027

Open
spinkney opened this issue Feb 23, 2024 · 4 comments · Fixed by #3039
Open

can we reorganize to put the constraint transforms into their own folder? #3027

spinkney opened this issue Feb 23, 2024 · 4 comments · Fixed by #3039

Comments

@spinkney
Copy link
Collaborator

I'd like to add some additional constraint transforms and have these be referenced more easily. Is it a heavy lift to reorganize and have a folder dedicated to these?

@syclik
Copy link
Member

syclik commented Feb 27, 2024

I don't think it'd be that heavy of a lift. What do you propose?

@SteveBronder
Copy link
Collaborator

I like this idea. Constraints are certainly a "special" function for stan math like how we have a folder for probability distributions. I'd actually go further and propose we merge the *_constrain and *_free files for each constrain as well. Each constrain needs an associated free and I think it makes sense to have them all together in one file.

What do you propose?

Just a constraints folder feels fine to me. For backwards compatibility should we leave the literal files there just empty? Otherwise code that includes those specific files would fail to compile

@SteveBronder
Copy link
Collaborator

For backwards compatibility should we leave the literal files there just empty?

Or just an include to the stan/math/*/constraints/this_constraint.hpp file

@spinkney
Copy link
Collaborator Author

I can just never find what the constraint files that I'm looking for, this would make it much easier to navigate. I'm good with constraints as the folder name.

I like this idea. Constraints are certainly a "special" function for stan math like how we have a folder for probability distributions. I'd actually go further and propose we merge the *_constrain and *_free files for each constrain as well. Each constrain needs an associated free and I think it makes sense to have them all together in one file.

I agree that they can be merged together. That would make it much easier to read the constraint code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants