diff --git a/test/bipartite.jl b/test/bipartite.jl index 13a63ee..29f6047 100644 --- a/test/bipartite.jl +++ b/test/bipartite.jl @@ -1,4 +1,4 @@ -using Graphs, IndexedGraphs, SparseArrays, Random +using Graphs, IndexedGraphs, SparseArrays @testset "bipartite graph" begin nl = 15 @@ -66,15 +66,14 @@ using Graphs, IndexedGraphs, SparseArrays, Random end @testset "bipartite generators" begin - rng = MersenneTwister(0) ngraphs = 20 - nrights = rand(rng, 5:50, ngraphs) - nlefts = rand(rng, 5:50, ngraphs) - es = [rand(rng, 1:n*m) for (n, m) in zip(nrights, nlefts)] + nrights = rand(5:50, ngraphs) + nlefts = rand(5:50, ngraphs) + es = [rand(1:n*m) for (n, m) in zip(nrights, nlefts)] @testset "Random bipartite graph - fixed # edges" begin @test all(zip(nrights, nlefts, es)) do (n, m, e) - g = rand_bipartite_graph(rng, m, n, e) + g = rand_bipartite_graph(m, n, e) nv_right(g) == n && nv_left(g) == m && ne(g) == e end end @@ -82,7 +81,7 @@ using Graphs, IndexedGraphs, SparseArrays, Random @testset "Random bipartite graph - prob of edges" begin p = 0.1 @test all(zip(nrights, nlefts)) do (n, m) - g = rand_bipartite_graph(rng, n, m, p) + g = rand_bipartite_graph(m, n, p) nv_right(g) == n && nv_left(g) == m end end @@ -90,14 +89,14 @@ using Graphs, IndexedGraphs, SparseArrays, Random @testset "Random regular bipartite graph" begin k = 4 @test all(zip(nrights, nlefts)) do (n, m) - g = rand_regular_bipartite_graph(rng, n, m, k) + g = rand_regular_bipartite_graph(m, n, k) nv_right(g) == n && nv_left(g) == m && ne(g) == m * k end end @testset "Random bipartite tree" begin @test all(nrights) do n - g = rand_bipartite_tree(rng, n) + g = rand_bipartite_tree(n) nv(g) == n && !is_cyclic(g) end end