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

adding hasse graph #331

Merged
merged 8 commits into from
Jan 23, 2024
Merged

adding hasse graph #331

merged 8 commits into from
Jan 23, 2024

Conversation

mhajij
Copy link
Member

@mhajij mhajij commented Dec 24, 2023

adding Hasse graph to CC and SC.

Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2dbc4db) 96.87% compared to head (fab8d26) 96.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
- Coverage   96.87%   96.86%   -0.01%     
==========================================
  Files          32       32              
  Lines        3518     3544      +26     
==========================================
+ Hits         3408     3433      +25     
- Misses        110      111       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 2430 to 2442
G.add_node(str(tuple((n,))))
for e in self.edges:
(u,v) = sorted(e)

G.add_node( str((u,v)) )
G.add_edge(str(tuple((u,))),str((u,v)))
G.add_edge(str(tuple((v,))),str((u,v)))
for c in self.cells:
G.add_node( str(c.elements) )
for e in list(c.boundary):
(u,v) = sorted(e)
G.add_edge(str( (u,v) ),str(c.elements))
G.add_edge(str( (u,v) ),str(c.elements))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you add the tuples as strings? NetworkX is perfectly happy with tuple identifiers:

G = nx.Graph()
G.add_node((1, 2))
G.add_edge((1, 2), (4, 5))
G.number_of_nodes()  # == 2
G.number_of_edges()  # == 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@mhajij mhajij requested a review from ffl096 January 18, 2024 03:49
@ffl096 ffl096 merged commit cc7ae0d into main Jan 23, 2024
6 of 7 checks passed
@ffl096 ffl096 deleted the hasse branch January 23, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants