rbxmath / rbxmath

Mozilla Public License 2.0
18 stars 1 forks source link

Provide more functionality to Graph #3

Open Ukendio opened 6 months ago

Ukendio commented 6 months ago

Currently Graph seems to be just a way to hold some data and there aren't really any APIs that allows the user to just use it without having to implement the logic themselves.

There should be ways to create different graph types, such a undirected-, directed, acyclic-graph (and so on).

Additionally there should be separate free functions that allows you to run algorithms on these graphs such as dijkstra, subgraph isomorphism, astar, k shortest path, greedy matching etc.

Additionally some functions that can topologically sort the graph, check the path connectivity, and a way to condense strongly connected components into a node.

These are a lot of different things and they by no means needs to all be implemented but they are things that are nice to have.

Ukendio commented 6 months ago

subgraph isomorphism is a NP-complete problem which is very difficult to tackle.

from @aidan-epperly

I mean, NP-complete doesn't disqualify it from implementation, but it's still quite a difficult problem and it will never be fast unless the test graph is something like a clique h