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

How can I add a subgraph? #81

Closed
r0ckarong opened this issue Feb 17, 2023 · 2 comments
Closed

How can I add a subgraph? #81

r0ckarong opened this issue Feb 17, 2023 · 2 comments

Comments

@r0ckarong
Copy link
Contributor

I've just recently started using this to automatically generate some overview diagrams for file relationships but I'm running into some problems with placing the nodes in a human readable way. I find subgraphs over and over to possibly be the solution. Does the library in the current state support subgraphs and/or clustered nodes? The documentation is not conclusive on this.

@monora
Copy link
Owner

monora commented Feb 17, 2023

What do you mean by subgraph? In the sense of the Wikipedia definition?

There is no explicit class or module for such subgraphs in RGL. But the concept can easily be realized with ImplicitGraphs. Here is an example using Graph#vertices_filtered_by.

If you mean by subgraph or clusterd node a graph vertex, which itself is a graph, then RGL does not have this concept. But since a graph vertex of a concrete graph can be any Ruby object, it may also be another graph.

Does this answer your question?

BTW: This should better have been a discussion.

@r0ckarong
Copy link
Contributor Author

Sorry for using the wrong place to ask this. Let me close this and start an actual discussion over there. Thanks for the reply.

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