Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial clique complex #200

Merged
merged 9 commits into from
Oct 24, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: added
  • Loading branch information
maximelucas committed Oct 24, 2022
commit c0cd622b019c2ad86b52867bdc34542f5289b245
15 changes: 12 additions & 3 deletions tests/generators/test_classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,21 @@ def test_flag_complex():

S = xgi.flag_complex(G)

simplices = [
frozenset({0, 1, 2}),
simplices_2 = [
frozenset({0, 1}),
frozenset({0, 2}),
frozenset({1, 2}),
frozenset({0, 3}),
]

assert S.edges.members() == simplices
simplices_3 = [frozenset({0, 1, 2})] + simplices_2

assert S.edges.members() == simplices_3

S1 = xgi.flag_complex(G, ps=[1], seed=42)
S2 = xgi.flag_complex(G, ps=[0.5], seed=42)
S3 = xgi.flag_complex(G, ps=[0], seed=42)

assert S1.edges.members() == simplices_3
assert S.edges.members() == simplices_2
assert S3.edges.members() == simplices_2