-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9984e54
commit 268c3a6
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
@testset "Rich club coefficient" begin | ||
@testset "Small graphs" for _n in 5:10 | ||
@test @inferred rich_club(star_graph(_n),1) ≈ 2 / _n | ||
@test @inferred rich_club(DiGraph(star_graph(_n)),1) ≈ 2 / _n | ||
@test @inferred rich_club(star_graph(_n), 1) ≈ 2 / _n | ||
@test @inferred rich_club(DiGraph(star_graph(_n)), 1) ≈ 2 / _n | ||
end | ||
@testset "Directed ($seed)" for seed in [1, 2, 3], (n, ne) in [(14, 18), (10, 22), (7, 16)] | ||
g = erdos_renyi(n, ne; is_directed=true, seed=seed) | ||
_r = rich_club(g,1) | ||
@test @inferred rich_club(g,1) > 0. | ||
_r = rich_club(g, 1) | ||
@test @inferred rich_club(g, 1) > 0. | ||
end | ||
@testset "Undirected ($seed)" for seed in [1, 2, 3], (n, ne) in [(14, 18), (10, 22), (7, 16)] | ||
g = erdos_renyi(n, ne; is_directed=false, seed=seed) | ||
_r = rich_club(g,1) | ||
@test @inferred rich_club(g,1) > 0. | ||
_r = rich_club(g, 1) | ||
@test @inferred rich_club(g, 1) > 0. | ||
end | ||
end |