You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! 👋 I've been trying out this library and it seems to work great for my use case.
There is a small problem that I'm running into where I don't know the longest path ahead of time, and I have multiple disconnected graph components, e.g.
When I try to use get, I don't know which starting nodes to use or which components exist, so I'd have to do something like:
detect all disconnected components (e.g. run DFS to discover all nodes in each connected component)
determine the longest path for each component so I can call get per component (e.g. if I do something like DFS to discover all disconnected components, this is easy enough)
I can do this on my side, but I was wondering if it makes sense to add this directly into digl since DFS is already being applied to the graph there anyway. For now I've been working around it by adding a fake node that's connected to all nodes, but this doesn't work well with addEmptySpots
The text was updated successfully, but these errors were encountered:
Interesting use-case. It sparks some ideas on my side:
It should be possible to determine the 'root' in both components of your example automatically. If. this is build in DIGL directly, indicating the 'root' would become optional. Some graphs dont have a dedicated 'root' (loops), or can have several 'roots' (e.g. state machines with different entry points). But in the majority of the cases it can just be build in.
Instead of returning a single 'ranking' for a single graph, it should be possible to return an array of 'rankings' for each of the individual graphs. This also allows for disconnected nodes to be part of the output instead of just being left out.
Indicating an array of 'roots' that can be used, in case of multiple separate graphs.
It should definitely be possible to build this into DIGL, so I'll have a go at it.
Hi! 👋 I've been trying out this library and it seems to work great for my use case.
There is a small problem that I'm running into where I don't know the longest path ahead of time, and I have multiple disconnected graph components, e.g.
When I try to use
get
, I don't know which starting nodes to use or which components exist, so I'd have to do something like:get
per component (e.g. if I do something like DFS to discover all disconnected components, this is easy enough)I can do this on my side, but I was wondering if it makes sense to add this directly into digl since DFS is already being applied to the graph there anyway. For now I've been working around it by adding a fake node that's connected to all nodes, but this doesn't work well with
addEmptySpots
The text was updated successfully, but these errors were encountered: