-
Notifications
You must be signed in to change notification settings - Fork 12
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
clamp() and clamp!() #115
Comments
Hmm, this is different from |
Hi @daanhb , I definitely understand hesitancy to add things to this package. Thanks for responding thoughtfully. However, I don't think adding
I would argue that
The concept of a ball fundamentally assumes a distance metric, so I would argue that DomainSets assumes a default metric of I am proposing that we extend the existing decision for |
That's a fair point. I guess a good way to implement a distance metric would be to implement In fact we already have the Anyway, if |
An important operation for reinforcement learning contexts is to clamp an input to the nearest point within a set. Does anyone have objections to implementing
Base.clamp
andBase.clamp!
for some sets in this package?This would be similar to what is currently implemented in IntervalSets:
clamp(3, 1..2)
returns2
.The text was updated successfully, but these errors were encountered: