#16408: Map database
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.3
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:  u/vdelecroix       |       Commit:
  /experimental-                     |  26142c40aec12804c9d744b5807057a9e57b780d
  combinatorial_map_database         |     Stopgaps:
   Dependencies:  #16410             |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * commit:   => 26142c40aec12804c9d744b5807057a9e57b780d
 * dependencies:   => #16410
 * branch:   => u/vdelecroix/experimental-combinatorial_map_database


Old description:

> The current implementation of `combinatorial_map` modifies some methods
> of objects in order to tag them as being a "combinatorial map". In this
> ticket we propose an implementation of a database and a decorator which
> register the methods but do not modify them.
>
> Currently we have the following proposals
> - `u/vdelecroix/experimental-combinatorial_map_database`
> - ... [add yours]

New description:

 The current implementation of `combinatorial_map` modifies some methods of
 objects in order to tag them as being a "combinatorial map" (it might be
 not the case anymore with #16410). In this ticket we propose an
 implementation of a database (`sage.databases.map_database`) and a
 decorator (`@register_method_as_map`) which register the methods but do
 not modify them. Contrarily to the previous implementation, the version
 proposed here is centralized. Which is actually consistent with the fact
 that we want to do some queries.

 Problems:
  - the database is built in two times. At startup, (more precisely when
 the code is executed) the decorator fills a list of constructions. Then,
 at the first call of `MapDatabase()` the corresponding maps are actually
 built.
  - some objects have no general enough parents: `AlternatingSignMatrix`,
 `Core`, `OrderedSetPartition` and the more delicate `Poset`, `Graph`
 (Vincent: I think that we might fix the three first in some tickets and
 use a hack for the two last with `Set_PythonType`).

 Further development:
  - add more information into morphisms (especially
 injectivity/surjectivity, order for endomorphism, ...)

--

Comment:

 I will not work on this anymore before having some '''constructive'''
 comments. Or even better, somebody else contribution. If you apply my
 branch the file `sage/combinat/combinatorial_map.py` becomes almost empty
 and I might fix it later on.

 Vincent
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=e710102d88761eec69e3e76fc262da2eebe26ec3
 e710102]||{{{experimental redesign of combinatorial maps}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=d1fac917c2c14344420bc73e7965b23eb1daeebd
 d1fac91]||{{{Move the database to databases.map_database}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=00aa8035103a12b639c955d2dce82df6c410d527
 00aa803]||{{{forgot the file map_database.py}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=26142c40aec12804c9d744b5807057a9e57b780d
 26142c4]||{{{much simpler implementation}}}||

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