Skip to content

Commit

Permalink
Fix bug in copy(pg::PartitionedGraph) (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 authored Feb 15, 2024
1 parent 08df103 commit dd9c5cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Graphs/partitionedgraphs/partitionedgraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function copy(pg::PartitionedGraph)
copy(unpartitioned_graph(pg)),
copy(partitioned_graph(pg)),
copy(partitioned_vertices(pg)),
copy(partitionvertex(pg)),
copy(which_partition(pg)),
)
end

Expand Down
2 changes: 2 additions & 0 deletions test/test_partitionedgraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ using Graphs
@test is_tree(partitioned_graph(pg))
@test nv(pg) == nx * ny
@test nv(partitioned_graph(pg)) == nx
pg_c = copy(pg)
@test pg_c == pg

#Same partitioning but with a dictionary constructor
partition_dict = Dictionary([first(partition) for partition in partitions], partitions)
Expand Down

0 comments on commit dd9c5cd

Please sign in to comment.