#16553: Clean IncidenceStructure
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.3
      Component:  combinatorial      |   Resolution:
  designs                            |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Nathann Cohen,     |  Work issues:
  Vincent Delecroix                  |       Commit:
Report Upstream:  N/A                |  9be78f42a2e26008661462f6db66b5646849ee76
         Branch:  public/16553v2     |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Yo !

 > - It makes sense to translate everything on {0,...,n-1} internally. It
 will save a lot of pain.

 +1

 > - For the blocks we can put it into a fixed datastructure: i.e. a sparse
 incidence matrix (that way even the blocks are numbered). Sparse integer
 matrices have methods
 > {{{
 > def _nonzero_positions_by_row(self, copy=True)
 > def _nonzero_positions_by_column(self, copy=True)
 > }}}
 > It is a bit stupid for our purpose to use GMP integers... but at least
 these are fast methods.
 >
 > What do you think of getting rid of the attribute `._blocks` and use
 only `._incidence_matrix`.

 I don't like it, because I don't trust complicated datatypes. What do we
 earn by storing this as a matrix ? I expect it to be heavier (because it
 has to remember the '1' in each cell, it is not meant to be a binary
 matrix) and less practical (we iterate on the blocks all day long)..

 The best data structure for this is a bipartite graph, isn't it ?

 But even then, I personally prefer simple data types. Otherwise we will
 constantly do work on list of lists, translate everything to a
 matrix/graph, then export everything to list of lists, then build another
 incidence structure ...

 What do you think ?

 Nathann

 Nathann

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