
Show HN: Graph Playground - Make Graphs/Networks and run Algorithms - mikedombo
https://mikedombo.github.io/graphPlayground/
======
philipov
Here's a link to the git repo:
[https://github.com/MikeDombo/graphPlayground](https://github.com/MikeDombo/graphPlayground)

------
lmeyerov
This idea is very cool!

Would you be interested in splitting out the predefined graphs into another
repo / into an npm package? I'd love to use+extend as part of PyGraphistry!

~~~
mikedombo
I'll definitely consider that. The whole predefined graphs file is only about
90 lines for the relevant bits if you just want to copy that into your
project.

------
djhworld
If you label the nodes in the graph with a value (e.g. 'A') then try running
one of the search algorithms (BFS) with 'A' to 'C' or whatever, it doesn't
work.

I think you're supposed to put a node ID in there instead, but it's not very
clear

~~~
mikedombo
It still needs some polish work like converting labels to Id's when
appropriate and catching errors otherwise. I'll do that stuff this week.

~~~
mikedombo
I added a conversion so that you can enter the ID or the label.

------
gavinpc
Very nice.

Doesn't work if cookies are blocked. Use a try/catch to feature-test
localStorage.

So many times but it's not getting to me.

~~~
mikedombo
Thanks for the tip, I'll definitely look into it. Cookies shouldn't matter
since I don't use them, but localstorage would be a tiny problem.

~~~
mikedombo
I added a check so it should be working now without localStorage.

------
timthelion
The Königsberg bridges graph is wrong. There should be seven edges.
[https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsbe...](https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg)

~~~
mikedombo
You're correct, right now it doesn't support multigraphs because of a library
I'm using. I'll modify it soon to add that support and then the bridges will
be correct.

~~~
mikedombo
Multigraphs are now supported and so the bridge graph is now correct.

