@@ -28,6 +28,7 @@ using NamedGraphs.GraphsExtensions:
2828 vertextype
2929using NamedGraphs. NamedGraphGenerators:
3030 named_comb_tree, named_grid, named_triangular_lattice_graph
31+ using NamedGraphs. OrderedDictionaries: OrderedDictionary
3132using NamedGraphs. PartitionedGraphs:
3233 PartitionEdge,
3334 PartitionedGraph,
@@ -52,7 +53,7 @@ using Test: @test, @testset
5253 pg = PartitionedGraph (g, partitions)
5354 @test vertextype (partitioned_graph (pg)) == Int64
5455 @test vertextype (unpartitioned_graph (pg)) == vertextype (g)
55- @test isa (partitionvertices (pg), Dictionary {Int64,PartitionVertex{Int64}})
56+ @test isa (partitionvertices (pg), OrderedDictionary {Int64,PartitionVertex{Int64}})
5657 @test isa (partitionedges (pg), Vector{PartitionEdge{Int64,NamedEdge{Int64}}})
5758 @test is_tree (partitioned_graph (pg))
5859 @test nv (pg) == nx * ny
@@ -67,7 +68,7 @@ using Test: @test, @testset
6768 @test vertextype (unpartitioned_graph (pg)) == vertextype (g)
6869 @test isa (
6970 partitionvertices (pg),
70- Dictionary {Tuple{Int64,Int64},PartitionVertex{Tuple{Int64,Int64}}},
71+ OrderedDictionary {Tuple{Int64,Int64},PartitionVertex{Tuple{Int64,Int64}}},
7172 )
7273 @test isa (
7374 partitionedges (pg),
109110 inter_column_edges = [(1 , 1 , i) => (2 , 1 , i) for i in 1 : nz]
110111 @test length (partitionedges (pg, inter_column_edges)) == 1
111112 @test length (partitionvertices (pg, [(1 , 2 , i) for i in 1 : nz])) == 1
113+ @test all ([length (edges (pg, pe)) == nz for pe in partitionedges (pg)])
112114
113115 boundary_sizes = [length (boundary_partitionedges (pg, pv)) for pv in partitionvertices (pg)]
114116 # Partitions into a square grid so each partition should have maximum 4 incoming edges and minimum 2
0 commit comments