-
Notifications
You must be signed in to change notification settings - Fork 56
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] Unify Support
syntax for all Distributions
#222
Comments
I think the best way to model the support is to use |
FSharp.Stats/src/FSharp.Stats/Intervals.fs Lines 7 to 9 in 7de8b82
We may consider having static member (for overloads) or at least the first one: ofTuple: ('a * 'a) -> Interval<'a>
ofTuple: ('a * 'a) option -> Interval<'a> Should the implementation do a comparison in case the values are swapped, and what should occur if they are? Also, may be useful to offer the reverse: toTuple: 'a Interval -> ('a * 'a) option If the type is meant only for closed interval (rather than a larger set of those), maybe it is better to just name it |
Totally agree to the ofTuple and toTuple member:+1: I'm not sure if in any case it is allowed to have endValue < startValue. I dont't think so and therefore I would add a check that fails if the input is meaningless. It may be an option to update the Interval type with a |
Is your feature request related to a problem? Please describe.
The syntax for the
static member Support ...
functions are written in a different syntax.Bernoulli has a list, whereas hypergeometric returns a tuple.
FSharp.Stats/src/FSharp.Stats/Distributions/Discrete.fs
Lines 55 to 57 in 262f1ac
FSharp.Stats/src/FSharp.Stats/Distributions/Discrete.fs
Lines 228 to 230 in 262f1ac
Describe the solution you'd like
Maybe use this issue to discuss not only unifying the syntax, but reworking it to be more intuitive and usable.
The text was updated successfully, but these errors were encountered: