Last active
December 7, 2022 19:48
-
-
Save singularitti/8d61192e4ffe87d97442c9c7bd287eda to your computer and use it in GitHub Desktop.
Merge 2 graphs #Julia #graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function merge(g, b) | |
a = copy(g) | |
add_vertices!(a, nv(b)) | |
for e in edges(h) | |
add_edge!(a, src(e) + nv(g), dst(e) + nv(g)) | |
end | |
return a | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment