Opened 4 years ago

Closed 4 years ago

#21666 closed enhancement (fixed)

Changes to Posets.DivisorLattice()

Reported by: jmantysalo Owned by:
Priority: major Milestone: sage-7.4
Component: combinatorics Keywords:
Cc: Merged in:
Authors: Jori Mäntysalo Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 60c6ee1 (Commits) 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 4 years ago by jmantysalo

  • Branch set to u/jmantysalo/faster-DivisorLattice

comment:2 Changed 4 years ago by jmantysalo

  • Commit set to 8ee46bce3159d9dd51e7fd1639e67cd4a2790f25
  • Status changed from new to needs_review

New commits:

8ee46bcModify DivisorLattice(n).

comment:3 follow-up: Changed 4 years ago by tscrim

  • 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 4 years ago by git

  • Commit changed from 8ee46bce3159d9dd51e7fd1639e67cd4a2790f25 to 87bd385c77dde049d146ac317309dec372e255f0

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

87bd385Parentheses from import.

comment:5 in reply to: ↑ 3 Changed 4 years ago by jmantysalo

  • 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 4 years ago by git

  • 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:

5ae54b3Make LatticePoset(..., linear_extension=True) work.

comment:7 Changed 4 years ago by tscrim

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.

Edit - Actually, if you want to remove the dependency of #20434 on this, you could cherry-pick the commit 5ae54b3 onto a new branch.

Last edited 4 years ago by tscrim (previous) (diff)

comment:8 Changed 4 years ago by jmantysalo

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 4 years ago by tscrim

  • Branch changed from u/jmantysalo/faster-DivisorLattice to public/posets/faster_DivisorLattice-21666
  • Commit changed from 5ae54b3cc5b1ce336cd4d8e1fcefb84119f1ccf0 to 60c6ee1a297aed26352659dd23de1e2f42450bae
  • Status changed from needs_review to positive_review

Fixed the git branch issues with #20434.


New commits:

aaf79c6Merge branch 'u/jmantysalo/faster-DivisorLattice' of git://trac.sagemath.org/sage into u/jmantysalo/faster-DivisorLattice
60c6ee1Revert "Make LatticePoset(..., linear_extension=True) work."

comment:10 Changed 4 years ago by jmantysalo

Thanks!

comment:11 Changed 4 years ago by vbraun

  • Branch changed from public/posets/faster_DivisorLattice-21666 to 60c6ee1a297aed26352659dd23de1e2f42450bae
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.