#19107: Do not count 4 times the same solution (up to rotations) in
QuantuminoSolver
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  slabbe                 |       Status:  needs_work
           Type:         |    Milestone:  sage-6.9
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  combinatorics          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  25ed836ab3fd20461bdfa509fdbb8e764c3458f7
Report Upstream:  N/A    |     Stopgaps:
         Branch:         |
  u/slabbe/19107         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by slabbe):

 Replying to [comment:3 vdelecroix]:
 > This is bad
 > {{{
 > H = [h for h in G if all(i==j for (i,j) in
 h.matrix().nonzero_positions())]
 > }}}

 The code below would be nice but leads to this bug: #19270.

 {{{
 #!python
 from sage.misc.misc_c import prod
 it = itertools.product((1,-1), repeat=n)
 if orientation_preserving:
     H = [diagonal_matrix(L) for L in it if prod(L) == 1]
 else:
     H = [diagonal_matrix(L) for L in it]
 H = G.subgroup(H)
 }}}

 If you can find a way of creating `G` and `H` so that `g * h` works and
 returns an hashable object for all g in G and h in H, tell me.

--
Ticket URL: <http://trac.sagemath.org/ticket/19107#comment:5>
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