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

Random MultilayerGraph generation should be a utility function #22

Closed
mschauer opened this issue Aug 24, 2022 · 2 comments
Closed

Random MultilayerGraph generation should be a utility function #22

mschauer opened this issue Aug 24, 2022 · 2 comments

Comments

@mschauer
Copy link

Goes a bit against the grain to make this task something the constructor does.

https://github.com/InPhyT/MultilayerGraphs.jl/blob/bcfcebfb74ddc2ef77664cb0eb9045307106136e/src/multilayerdigraph.jl#L21

@InterdisciplinaryPhysicsTeam
Copy link
Member

Hi @mschauer,

Thanks for this issue!

Generally speaking, we think that delegating the instantiation of random graphs to a constructor may lead to better consistency in the ecosystem. After all, if we just substituted the arguments min_edges and max_edges with ne (the number of required random edges) we would have something very close (the closest possible?) to what Graphs.jl already does for its concrete types SimpleGraph and SimpleDiGraphs. They infact support random graph generation via SimpleGraph(nv,ne) and SimpleDiGraph(nv,ne).

Here we better explain what we mean (see bullet point 2. : it is meant mainly for "non-wrapper" packages, but we tried to stick to that as much as we could).

By the way just noticed that the docstring should be updated, it has graph_type::Type{<: AbstractGraph} instead of graph_types::Vector{DataType}. We have just fixed it.

CC: @pitmonticone , @ClaudMor

@mschauer
Copy link
Author

True, you are just following the example. Moved the issue...

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