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

JuliaGraphs interop: export edges to (int,int) list #50

Closed
tfiers opened this issue Jan 5, 2023 · 0 comments
Closed

JuliaGraphs interop: export edges to (int,int) list #50

tfiers opened this issue Jan 5, 2023 · 0 comments

Comments

@tfiers
Copy link
Owner

tfiers commented Jan 5, 2023

i.e. provide

# Graphs.jl needs nodes to be integers
nodes = Dict(pkg => i for (i, pkg) in enumerate(packages))
node(pkg) = nodes[pkg]

sth like

packages, nodes, edges = PkgGraph.export_for_Graph(pkg)

or even sth that can be passed to one of the DiGraph constructors,
https://juliagraphs.org/Graphs.jl/dev/core_functions/simplegraphs/#Graphs.SimpleGraphs.SimpleDiGraph-Union{Tuple{Array{Graphs.SimpleGraphs.SimpleEdge{T},%201}},%20Tuple{T}}%20where%20T%3C:Integer

(no, we're not importing AbstractGraph: it's not defined in interface pkg, but rahter in Graphs.jl itself)

but yeah, it'd be sth as the above, (maybe with packageslabels?),
just that edges will be list of (int,int), not (str=>str)

@tfiers tfiers changed the title JuliaGraphs interop: mayb provide integer nodes func JuliaGraphs interop: export edges to (int,int) list Jan 5, 2023
@tfiers tfiers added feature An enhancement to src/ visible to end-users and removed feature An enhancement to src/ visible to end-users labels Jan 5, 2023
@tfiers tfiers closed this as completed in 74880e0 Jan 5, 2023
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

1 participant