Opened 3 years ago

Closed 3 years ago

#27341 closed enhancement (fixed)

spring cleanup in Hasse diagrams

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.7
Component: combinatorics Keywords:
Cc: tscrim, jmantysalo Merged in:
Authors: Frédéric Chapoton Reviewers: David Coudert
Report Upstream: N/A Work issues:
Branch: 68ae448 (Commits, GitHub, GitLab) Commit: 68ae448ab955d573075238a7e552c22dbd6070a3
Dependencies: Stopgaps:

Status badges

Description

including a small enhancement in the computation of Moebius matrix

and a bunch of pep8 changes

Change History (8)

comment:1 Changed 3 years ago by chapoton

  • Branch set to u/chapoton/27341
  • Status changed from new to needs_review

comment:2 Changed 3 years ago by git

  • Commit set to 6d3aeab32bf45fff7063c93fe78c7ddcf92d4702

Branch pushed to git repo; I updated commit sha1. New commits:

6d3aeabsome cleanup in finite posets and Hasse diagrams

comment:3 Changed 3 years ago by git

  • Commit changed from 6d3aeab32bf45fff7063c93fe78c7ddcf92d4702 to 883ee3285e0888768f276050b119a733f1ae37cf

Branch pushed to git repo; I updated commit sha1. New commits:

883ee32fix wrong changes (oops)

comment:4 Changed 3 years ago by dcoudert

Is this a correct alignment or should the 3rd line be slightly shifted ?

+                        S = [x for x in self.neighbors_out(linext[k - 1])
+                             if x not in linext and
+                             all(low in linext for low in self.neighbors_in(x))]

I don't find this change improving the readability, but if it's the correct pep8 form, then OK.

-        return (self.num_edges()+1 == self.num_verts() and # Hasse Diagram is a tree
-                all(d<=1 for d in self.out_degree())   and # max outdegree is <= 1
-                all(d<=1 for d in self.in_degree()))       # max  indegree is <= 1
+        return (self.num_edges() + 1 == self.num_verts() and
+                # Hasse Diagram is a tree
+                all(d <= 1 for d in self.out_degree()) and
+                # max outdegree is <= 1
+                all(d <= 1 for d in self.in_degree()))  # max  indegree is <= 1

otherwise, looks good to me.

comment:5 Changed 3 years ago by git

  • Commit changed from 883ee3285e0888768f276050b119a733f1ae37cf to 68ae448ab955d573075238a7e552c22dbd6070a3

Branch pushed to git repo; I updated commit sha1. New commits:

68ae448minor pep8 changes

comment:6 Changed 3 years ago by chapoton

(1) This is indeed pep8-valid. I changed slightly these lines by cutting the last line

(2) I remove the superfluous comments and shorten the first one.

comment:7 Changed 3 years ago by dcoudert

  • Reviewers set to David Coudert
  • Status changed from needs_review to positive_review

OK.

comment:8 Changed 3 years ago by vbraun

  • Branch changed from u/chapoton/27341 to 68ae448ab955d573075238a7e552c22dbd6070a3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.