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

Support Graphs.jl's generators for common graphs #28

Closed
mroavi opened this issue Apr 27, 2022 · 3 comments
Closed

Support Graphs.jl's generators for common graphs #28

mroavi opened this issue Apr 27, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mroavi
Copy link

mroavi commented Apr 27, 2022

Graphs.jl provides these generators for common graphs.

As far as I can tell, these cannot be used conveniently with MetaGraphsNext.jl yet:

julia> MetaGraphsNext.MetaGraph(path_graph(5), default_weight = 3.0)

 Warning: Constructing a MetaGraph with a nonempty underlying graph is not advised.
└ @ MetaGraphsNext ~/.julia/dev/MetaGraphsNext/src/metagraph.jl:55
Meta graph based on a {5, 4} undirected simple Int64 graph with vertex labels of type Symbol, vertex metadata of type Nothing, edge metadata of type Nothing, graph metadata given by nothing, and default weight 3.0

Would be nice to add support for these.

@gdalle
Copy link
Member

gdalle commented Feb 22, 2023

The issue with this is that when building a MetaGraph with a non-empty graph, you also need to provide all the metadata and vertex labels upfront. By default metadata types for vertices and edges are Nothing, so there is an obvious value to pick if the user doesn't specify it. It gets a bit tricker with vertex labels since they must be unique.

I think #6 is part of the solution

@gdalle gdalle added the enhancement New feature or request label Feb 22, 2023
@gdalle
Copy link
Member

gdalle commented Feb 22, 2023

Related to #37

@gdalle
Copy link
Member

gdalle commented Mar 30, 2023

Solved by the new bulk constructor in #45

@gdalle gdalle closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants