-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed RandomUtils.NextFloat() extension methods #177
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
Conversation
Update fork...
Update local fork
Update fork
Update fork
Setting 'useHeader: false' in 'TrainAndPredictIrisModelTest' because …
Update fork
Update Fork
…d NextSingle() -> NextFloat()
/// </summary> | ||
Single NextSingle(); | ||
Single NextFloat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NextFloat [](start = 15, length = 9)
Hi @zeahmed thanks for the change.
I understand that it results in fewer files changed, but let's please not change IRandom
. I want to get rid of the RandomUtils
, but I'm less enthusiastic about making IRandom
resemble it. Maybe use VS to rename this back to NextSingle
.
More generally: Float
(capital F
) is not a concept we want to expose. Back when we had "single" and "double" precision builds, with Float
type aliases in practically every file it was a concept in this codebase, but those days are long over. Now then, the RandomUtils
, being a shim to facilitate that, exposed this. (Once upon a time, there was an #ifdef
surrounding that block of code you've now removed, plus a few alternate codepaths.) But we should be working on removing vestigates from that time rather than having them infect "clean" innocent interfaces that had nothing to do with that. :D #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. I will rename NextFloat() -> NextSingle().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed two NextFloat() extension methods from RandomUtils and replaced all usage of them with `IRandom.NextSingle()`.
Fixing #166
Removed two NextFloat() extension methods from RandomUtils and renamed NextSingle() to NextFloat()
Currently, NextFloat() is used everywhere instead of NextSingle().
Actually, for some implementation NextFloat() actually calls NextSingle() internally. Let me know if NextSingle() needs to be preserved.