Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Graph Playground - Make Graphs/Networks and run Algorithms (mikedombo.github.io)
57 points by mikedombo on Dec 3, 2017 | hide | past | favorite | 12 comments


Here's a link to the git repo: https://github.com/MikeDombo/graphPlayground


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!


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.


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


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.


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


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.


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.


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


The Königsberg bridges graph is wrong. There should be seven edges. https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsbe...


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.


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




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: