#17911 closed enhancement (fixed)
Implement connected components for posets
Reported by:  tscrim  Owned by:  sagecombinat 

Priority:  major  Milestone:  sage6.6 
Component:  combinatorics  Keywords:  posets 
Cc:  sagecombinat  Merged in:  
Authors:  Travis Scrimshaw  Reviewers:  Nathann Cohen 
Report Upstream:  N/A  Work issues:  
Branch:  0ca72f3 (Commits)  Commit:  
Dependencies:  Stopgaps: 
Description
Currently connected_components
is missing for Poset
, and a useful/common feature to have.
Change History (9)
comment:1 Changed 4 years ago by
 Branch set to public/combinat/posets/connected_components17911
 Commit set to 02413eff9d1f12968bd673ab45d7ab1f03d71e4d
 Status changed from new to needs_review
comment:2 Changed 4 years ago by
Hello Travis,
Could you add this new function to the index of poset methods, at the top of the file ?
Thanks,
Nathann
comment:3 Changed 4 years ago by
 Commit changed from 02413eff9d1f12968bd673ab45d7ab1f03d71e4d to d27121b06618cbfaf340e58be7232e17b69332d0
Branch pushed to git repo; I updated commit sha1. New commits:
d27121b  Adding method to header information.

comment:4 Changed 4 years ago by
 Status changed from needs_review to needs_work
I am sorry I did not notice it earlier, but your doctest has an output which can potentially be architecture dependent, i.e. the list of two posets on 5 and 3 elements.
You can easily fix it by creating a poset with two connected components on 5 elements.
Nathann
comment:5 Changed 4 years ago by
 Commit changed from d27121b06618cbfaf340e58be7232e17b69332d0 to 0ca72f3919aead7ea6e2080580c02690293d03fb
Branch pushed to git repo; I updated commit sha1. New commits:
0ca72f3  Making doctest output constant.

comment:6 followup: ↓ 7 Changed 4 years ago by
 Status changed from needs_work to needs_review
I fixed it by sorting the output based on the size of each connected component.
comment:7 in reply to: ↑ 6 Changed 4 years ago by
 Reviewers set to Nathann Cohen
 Status changed from needs_review to positive_review
I fixed it by sorting the output based on the size of each connected component.
Okay, that does te job too. Good to go!
Nathann
comment:8 Changed 4 years ago by
 Branch changed from public/combinat/posets/connected_components17911 to 0ca72f3919aead7ea6e2080580c02690293d03fb
 Resolution set to fixed
 Status changed from positive_review to closed
comment:9 Changed 4 years ago by
 Commit 0ca72f3919aead7ea6e2080580c02690293d03fb deleted
Thanks for doing the review Nathann.
New commits:
Implement connected components for posets.