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

ArgumentError in Graph.degeneracy/1 for version 0.10.2 #3

Closed
yonkeltron opened this issue Jul 23, 2017 · 9 comments
Closed

ArgumentError in Graph.degeneracy/1 for version 0.10.2 #3

yonkeltron opened this issue Jul 23, 2017 · 9 comments

Comments

@yonkeltron
Copy link
Contributor

Encountered this error (appears to be from ETS) when processing a smallish graph.

** (ArgumentError) argument error
      (stdlib) :ets.update_counter(#Reference<0.2437733789.3691642882.33749>, "heller.name", {2, -1})
    (libgraph) lib/graph.ex:1470: anonymous fn/4 in Graph.decompose_cores/4
      (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    (libgraph) lib/graph.ex:1469: anonymous fn/6 in Graph.decompose_cores/4
      (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    (libgraph) lib/graph.ex:1467: Graph.decompose_cores/4
    (libgraph) lib/graph.ex:1451: Graph.decompose_cores/1
    (libgraph) lib/graph.ex:1395: Graph.degeneracy/1
...snip...

Using Graph.info tells me that it looks like this: %{num_edges: 201, num_vertices: 101, size_in_bytes: 69504, type: :directed} while the printer representation gives me #Graph<type: directed, num_vertices: 101, num_edges: 201>. Neither of these enable me to send you the graph I'm working with. Any tips on how to serialize the graph for transmission to you?

Happy to provide more info since everything's bogus and simulated anyhow!

Thanks,
+Jonathan

@bitwalker
Copy link
Owner

Can you gist up the result of inspect Graph.edges/1? I can reconstruct the graph from that. Looks like my test graphs missed an edge case, sorry about that!

@yonkeltron
Copy link
Contributor Author

Unfortunately the inspect approach didn't work so well. However, encoding it as JSON worked great!

https://gist.github.com/yonkeltron/e48c10985cfc1933b94e45b7dccfe655

@bitwalker
Copy link
Owner

Yeah I forgot to mention that you can do inspect graph, structs: false to dump the raw graph (or any struct for that matter!). I'm flying today, but I'll take a look as soon as I can!

@bitwalker
Copy link
Owner

Found the problem - I forgot to account for self-referential edges. I've pushed the fix to master - looks good on my end though!

@yonkeltron
Copy link
Contributor Author

yonkeltron commented Jul 24, 2017 via email

@bitwalker
Copy link
Owner

Yeah, specifically loops from a vertex back to itself.

@yonkeltron
Copy link
Contributor Author

Will this fix go out in a dot release?

@bitwalker
Copy link
Owner

Yep, I'll get one published today. I wanted to get some improvements into the initial clique detection code to try and optimize it (it's pretty slow on large graphs, which is expected, but I think there may be ways to do better than the current perf profile), but I can release what is there now and do another point release with those improvements.

@bitwalker
Copy link
Owner

Just pushed 0.11.0 :)

heydtn pushed a commit to heydtn/libgraph that referenced this issue Nov 1, 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

No branches or pull requests

2 participants