Skip to content

Commit

Permalink
Extend union to multiple named graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Feb 12, 2024
1 parent c93c030 commit 9c95545
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/abstractnamedgraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ function union(graph1::AbstractNamedGraph, graph2::AbstractNamedGraph)
return union_graph
end

function union(
graph1::AbstractNamedGraph,
graph2::AbstractNamedGraph,
graph3::AbstractNamedGraph,
graph_rest::AbstractNamedGraph...,
)
return union(union(graph1, graph2), graph3, graph_rest...)
end

function rem_vertex!(graph::AbstractNamedGraph, vertex)
if vertex vertices(graph)
return false
Expand Down

0 comments on commit 9c95545

Please sign in to comment.