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

allow floats as weights #19

Merged
merged 3 commits into from
Aug 25, 2018

Conversation

georgewhewell
Copy link
Contributor

Don't know if float weights were deliberately prohibited, trivial test case passes though.

@coveralls
Copy link

coveralls commented May 16, 2018

Coverage Status

Coverage remained the same at 95.062% when pulling 1a4cdf4 on georgewhewell:feat/float-weights into dadfe90 on bitwalker:master.

@@ -48,7 +48,7 @@ defmodule Graph.Edge do
label = Keyword.get(opts, :label)
weight = Keyword.get(opts, :weight, 1)
case {label, weight} do
{_, w} = meta when is_integer(w) ->
{_, w} = meta when is_integer(w) or is_float(w) ->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace all is_integer(w) or is_float(w) in this PR with is_number(w)?

@bitwalker
Copy link
Owner

Sorry for the delay, just one change required and I'll get this merged!

@bitwalker bitwalker mentioned this pull request Aug 25, 2018
@bitwalker
Copy link
Owner

Actually, it's fine, I can get it taken care of :)

@bitwalker bitwalker merged commit a320434 into bitwalker:master Aug 25, 2018
@georgewhewell
Copy link
Contributor Author

@bitwalker thanks!

robindaumann pushed a commit to robindaumann/libgraph that referenced this pull request Mar 26, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants