From d9f4df9e01dc54a8e3d6b76161018d330b003f4e Mon Sep 17 00:00:00 2001 From: mtfishman Date: Tue, 30 Jan 2024 13:55:58 -0500 Subject: [PATCH] Bump to Dictionaries v0.4 --- Project.toml | 4 ++-- src/Dictionaries/dictionary.jl | 4 ---- src/Graphs/partitionedgraphs/partitionedgraph.jl | 6 +++--- src/distances_and_capacities.jl | 2 +- test/Project.toml | 5 +++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Project.toml b/Project.toml index 7e4c5ae..18aa260 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NamedGraphs" uuid = "678767b0-92e7-4007-89e4-4527a8725b19" authors = ["Matthew Fishman and contributors"] -version = "0.1.18" +version = "0.1.19" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -18,7 +18,7 @@ SymRCM = "286e6d88-80af-4590-acc9-0001b223b9bd" [compat] AbstractTrees = "0.3, 0.4" -Dictionaries = "0.3" +Dictionaries = "0.4" Graphs = "1.8" GraphsFlows = "0.1.1" LinearAlgebra = "1.7" diff --git a/src/Dictionaries/dictionary.jl b/src/Dictionaries/dictionary.jl index f2c5a7d..8ab2e86 100644 --- a/src/Dictionaries/dictionary.jl +++ b/src/Dictionaries/dictionary.jl @@ -1,7 +1,3 @@ -# Workaround for: https://github.com/andyferris/Dictionaries.jl/issues/98 -# TODO: Move to Dictionaries.jl file in NamedGraphs.jl -copy_keys_values(d::Dictionary) = Dictionary(copy(d.indices), copy(d.values)) - # Dictionaries.jl patch # TODO: delete once fixed in Dictionaries.jl # TODO: Move to Dictionaries.jl file in NamedGraphs.jl diff --git a/src/Graphs/partitionedgraphs/partitionedgraph.jl b/src/Graphs/partitionedgraphs/partitionedgraph.jl index af99de7..3f8cdad 100644 --- a/src/Graphs/partitionedgraphs/partitionedgraph.jl +++ b/src/Graphs/partitionedgraphs/partitionedgraph.jl @@ -98,8 +98,8 @@ function copy(pg::PartitionedGraph) return PartitionedGraph( copy(unpartitioned_graph(pg)), copy(partitioned_graph(pg)), - copy_keys_values(partitioned_vertices(pg)), - copy_keys_values(partitionvertex(pg)), + copy(partitioned_vertices(pg)), + copy(partitionvertex(pg)), ) end @@ -138,7 +138,7 @@ end ### PartitionedGraph Specific Functions function induced_subgraph(pg::PartitionedGraph, vertices::Vector) sub_pg_graph, _ = induced_subgraph(unpartitioned_graph(pg), vertices) - sub_partitioned_vertices = copy_keys_values(partitioned_vertices(pg)) + sub_partitioned_vertices = copy(partitioned_vertices(pg)) for pv in NamedGraphs.vertices(partitioned_graph(pg)) vs = intersect(vertices, sub_partitioned_vertices[pv]) if !isempty(vs) diff --git a/src/distances_and_capacities.jl b/src/distances_and_capacities.jl index 34fa628..ce408dc 100644 --- a/src/distances_and_capacities.jl +++ b/src/distances_and_capacities.jl @@ -11,7 +11,7 @@ function _symmetrize(dist) end function _symmetrize(dist::AbstractDictionary) - symmetrized_dist = copy_keys_values(dist) + symmetrized_dist = copy(dist) for k in keys(dist) insert!(symmetrized_dist, reverse(k), dist[k]) end diff --git a/test/Project.toml b/test/Project.toml index 2a66a4c..82b72d8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -2,10 +2,11 @@ Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" GraphsFlows = "06909019-6f44-4949-96fc-b9d9aaa02889" +KaHyPar = "2a6221f6-aa48-11e9-3542-2d9e0ef01880" +Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b" +NamedGraphs = "678767b0-92e7-4007-89e4-4527a8725b19" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9" -KaHyPar = "2a6221f6-aa48-11e9-3542-2d9e0ef01880" -Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b"