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

[Feature request] bounded with equality (ie [low, high] rather than (low, high)) #71

Open
theo-brown opened this issue Feb 9, 2024 · 3 comments

Comments

@theo-brown
Copy link

It would be great to add an option to bounded so that it supports interval constraints with equality.

Current behaviour:

julia> bounded(0., 0., 1.)
ERROR: ArgumentError: Value, 0.0, outside of specified bounds (0.0, 1.0).
Stacktrace:
 [1] bounded(val::Float64, lower_bound::Float64, upper_bound::Float64)
   @ ParameterHandling ~/.julia/packages/ParameterHandling/QaqXk/src/parameters_scalar.jl:54
@willtebbutt
Copy link
Member

This would be nice, but I'm not sure how you could achieve this in practice. Do you have any thoughts?

@willtebbutt
Copy link
Member

(The reason that we only support open intervals at the minute is because the bijections that we use map the bounds to -Inf and Inf )

@theo-brown
Copy link
Author

Agree - I've just had a look at the code for how it's currently implemented, and it's tricky to see how we'd adapt it to this. I'll have a think.

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

No branches or pull requests

2 participants