-
Notifications
You must be signed in to change notification settings - Fork 191
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
A Ones type #135
Comments
Why should such a type be defined in
|
I think this is pretty reasonable and a potentially good change, but it adds more complexity. I would like us to improve the design of our weighting functionality at some point to handle weights with different interpretations (right now everything is a frequency weight); maybe we can address this concern then? We probably need a different name than |
|
Great! I'm also a supporter of different kinds of weights. |
Hi, I may have implemented something like this in LightGraphs: see https://github.com/JuliaGraphs/LightGraphs.jl/blob/v4/src/distance.jl#L5-L14). Let me know if it's useful. |
I've just realized it might be possible to implement this using |
Any updates in implementing |
Do you want to give it a try? It shouldn't be hard to do (most of the work should be adapting tests to cover it). |
Sure. I will see if I can give it a try in the next few days and get a PR to review. |
|
A Ones type would be something like
(see this stackoverflow answer for the original proposal by @mbauman).
It's helpful because it allows to write efficient, generic code:
It's a good application of multiple dispatch. It would be great to define something like this in StatsBase.
The text was updated successfully, but these errors were encountered: