Changes between Version 2 and Version 6 of Ticket #10194

Mar 29, 2012, 8:30:12 PM (11 years ago)
Florent Hivert


  • Ticket #10194

    • Property Status changed from new to needs_review
    • Property Keywords factories days30 Cernay2012 added
    • Property Milestone changed from to sage-5.0
  • Ticket #10194 – Description

    v2 v6  
    1 At Sage days 30, a long brainstorm seems to have finalized the design. I'm writing a patch on sage combinat queue.
     1At Sage days 30, a long brainstorm seems to have finalized the design. Here is a exerpt from the documentation:
     3A ''set factory'' `F` is device, whose goal is to construct parent `P`
     4which models subsets of a big set `S`. Typically, the `P` s are constructed
     5within families obtained by putting a bunch of constraints `cons` on the
     6elements of the set `S`. In such a hierarchy of subsets, one needs to have a
     7fine and easy control on the elements construction. That is, one often needs
     8that `P` constructs elements in a subclass of its usual class for element. On
     9the contrary, one also often needs `P` to be a facade parent, meaning that `P`
     10construct element whose actual parent is not `P` itself.
     12The role of a set factory is twofold:
     14- ''manage a database'' of constructors for the different parents `P = F(cons)`
     15  depending on the various kinds of constraints `cons`. Note: currently there
     16  is no real support for that. We are gathering use case before fixing the
     17  interface.
     19- ensure that the elements `e = P(...)` created by the different parents
     20  follows a consistent policy concerning their ''class and parent''.
     22The patch implement this idea while trying to leave as much as possible space
     23for further improvement. In particular, I tried to specify the few possible
     24things about constraints. I'm even not completely sure about {{{add_constraints}}}.
     25Please comment and review.
     29'''Apply :''' [attachment:trac_10194-factories_policy-fh.patch trac_10194-factories_policy-fh.patch]