-
Notifications
You must be signed in to change notification settings - Fork 1
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
GraphView
for subgraphs
#8
Comments
One of the main gripes I have heard from people trying to get into graphs in julia were the comparably strange returns where you sometimes get arrays of arrays and sometimes a graph of a different type than you put in ( In my opinion, having graph views could really help making the whole experience a bit more "intuitive" and coherent. I was thinking about proposing this myself, but never found the time... |
Thanks for mentioning What would you expect from |
Ah! Yes. Spanning trees is what I was actually looking for. I would say that |
|
I think that might be a bit of an overkill though. I mean, if the function was called |
Fair. Maybe having the option of constructing a view from vertices like |
Related: JuliaGraphs/Graphs.jl#12 |
Just to chime in with another data point: GraphTool supports graph views and in-place filters. Haven't used that myself yet, but it seems like an interesting feature. |
I am just thinking out loud here..
Quite commonly I need to deal with subgraphs (i.e.
induced_subgraph
) or merged graphs (i.e.merge_vertices
).It's quite handy to have the bank
!
variations (i.e.merge_vertices
vsmerge_vertices!
), but they are not consistent across Graphs.jl. E.g.induced_subgraph
doesn't have a corresponding bank version.Sometimes I want to operate on a resulted converted graph, without losing the original but still influencing it.
It's like a combination of a bank
!
and without.This basically means having a view of the original graph.
The whole idea is very similar to the
DataFrames.jl
view
https://dataframes.juliadata.org/stable/man/basics/#ViewsThat might be more relevant for Metagraphs, since graphs will carry data that can be shallow- or deep-copied.
A view, e.g., should implement shallow copying (if not by reference)
Also it might be useful for different indexing, which might enable us to get rid of the
vmap
property that some functions return.I know it's a lot; I just wanted to share since now a lot of discussions are taking place for a Graphs.jl 2.0
I am still not 100% persuaded on this, but it looks to me like there could be some value.
What do you think and could you see different use cases ?
The text was updated successfully, but these errors were encountered: