Opened 6 years ago
Closed 6 years ago
#21666 closed enhancement (fixed)
Changes to Posets.DivisorLattice()
Reported by:  jmantysalo  Owned by:  

Priority:  major  Milestone:  sage7.4 
Component:  combinatorics  Keywords:  
Cc:  Merged in:  
Authors:  Jori Mäntysalo  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  60c6ee1 (Commits, GitHub, GitLab)  Commit:  60c6ee1a297aed26352659dd23de1e2f42450bae 
Dependencies:  Stopgaps: 
Description
This is kind of first part of #17147.
This will 1) make Posets.DivisorLattice(n)
faster; for example for n=123456789098765432100
it took 0,87 seconds without this, 0,17 seconds after this, and 2) make the linear extension to always be ascending numbers; try for example Posets.DivisorLattice(12).meet_irreducibles()
.
If this breaks nothing I will continue with other poset examples.
Change History (11)
comment:1 Changed 6 years ago by
 Branch set to u/jmantysalo/fasterDivisorLattice
comment:2 Changed 6 years ago by
 Commit set to 8ee46bce3159d9dd51e7fd1639e67cd4a2790f25
 Status changed from new to needs_review
comment:3 followup: ↓ 5 Changed 6 years ago by
 Reviewers set to Travis Scrimshaw
Trivial thing, you don't need the parentheses here: from sage.arith.misc import (divisors, is_prime)
. You can set a positive review on my behalf.
comment:4 Changed 6 years ago by
 Commit changed from 8ee46bce3159d9dd51e7fd1639e67cd4a2790f25 to 87bd385c77dde049d146ac317309dec372e255f0
Branch pushed to git repo; I updated commit sha1. New commits:
87bd385  Parentheses from import.

comment:5 in reply to: ↑ 3 Changed 6 years ago by
 Status changed from needs_review to positive_review
Replying to tscrim:
Trivial thing, you don't need the parentheses here:
from sage.arith.misc import (divisors, is_prime)
. You can set a positive review on my behalf.
Done that.
comment:6 Changed 6 years ago by
 Commit changed from 87bd385c77dde049d146ac317309dec372e255f0 to 5ae54b3cc5b1ce336cd4d8e1fcefb84119f1ccf0
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
5ae54b3  Make LatticePoset(..., linear_extension=True) work.

comment:7 Changed 6 years ago by
To fix things, you should create a new branch that is at the current commit (5ae54b3) and then reset this branch to the previous commit (87bd385). This will involve a force push here, but that's okay.
comment:8 Changed 6 years ago by
Another possibility: Can you review this, if I change the description?
Not very nice to have so unrelated modifications in one ticket, but...
comment:9 Changed 6 years ago by
 Branch changed from u/jmantysalo/fasterDivisorLattice to public/posets/faster_DivisorLattice21666
 Commit changed from 5ae54b3cc5b1ce336cd4d8e1fcefb84119f1ccf0 to 60c6ee1a297aed26352659dd23de1e2f42450bae
 Status changed from needs_review to positive_review
comment:10 Changed 6 years ago by
Thanks!
comment:11 Changed 6 years ago by
 Branch changed from public/posets/faster_DivisorLattice21666 to 60c6ee1a297aed26352659dd23de1e2f42450bae
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Modify DivisorLattice(n).