#19161: LatticePoset: faster is_complemented()
-------------------------------------+-------------------------------------
       Reporter:  jmantysalo         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jori Mäntysalo     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jmantysalo/faster_is_complemented|  bf8fdd5dd0702a6158691183ac6a3351461a650e
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by jmantysalo:

Old description:

> As playing with matrices is much faster than looping over elements, this
> patch makes `is_complemented()` much faster.
>
> Let `L10` bet the list of all lattices of 10 elements and `B10` be the
> Boolean lattice with `2^10` elements. Then without the patch it takes
> 7,76 seconds to run `len([L for L in L10 if L.is_complemented()])` and
> 101,84 seconds to run `L.is_complemented()`. With the patch the time
> reduces to 0,38 and 0,23 seconds.

New description:

 As playing with matrices is much faster than looping over elements, this
 patch makes `is_complemented()` much faster.

 Let `L10` bet the list of all lattices of 10 elements and `B10` be the
 Boolean lattice with `2^10` elements. Then without the patch it takes 7,76
 seconds to run `len([L for L in L10 if L.is_complemented()])` and 101,84
 seconds to run `B10.is_complemented()`. With the patch the time reduces to
 0,38 and 0,23 seconds.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/19161#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to