#10194: Set factories
-------------------------------------------------+--------------------------
Reporter: nthiery | Owner: hivert
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: combinatorics | Resolution:
Keywords: factories, days30, Cernay2012 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Florent Hivert | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------+--------------------------
Changes (by hivert):
* status: new => needs_review
Old description:
> At Sage days 30, a long brainstorm seems to have finalized the design.
> I'm writing a patch on sage combinat queue.
New description:
At Sage days 30, a long brainstorm seems to have finalized the design.
Here is a exerpt from the documentation:
A ''set factory'' `F` is device, whose goal is to construct parent `P`
which models subsets of a big set `S`. Typically, the `P` s are
constructed
within families obtained by putting a bunch of constraints `cons` on the
elements of the set `S`. In such a hierarchy of subsets, one needs to have
a
fine and easy control on the elements construction. That is, one often
needs
that `P` constructs elements in a subclass of its usual class for element.
On
the contrary, one also often needs `P` to be a facade parent, meaning that
`P`
construct element whose actual parent is not `P` itself.
The role of a set factory is twofold:
- ''manage a database'' of constructors for the different parents `P =
F(cons)`
depending on the various kinds of constraints `cons`. Note: currently
there
is no real support for that. We are gathering use case before fixing the
interface.
- ensure that the elements `e = P(...)` created by the different parents
follows a consistent policy concerning their ''class and parent''.
The patch implement this idea while trying to leave as much as possible
space
for further improvement. In particular, I tried to specify the few
possible
things about constraints. I'm even not completely sure about
{{{add_constraints}}}.
Please comment and review.
Florent
'''Apply :''' [attachment:trac_10194-factories_policy-fh.patch trac_10194
-factories_policy-fh.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10194#comment:6>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.