#10194: Set factories
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: hivert
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-6.8
Component: combinatorics | Resolution:
Keywords: factories, | Merged in:
days30, Cernay2012, days57 | Reviewers: Frédéric Chapoton
Authors: Florent Hivert | Work issues:
Report Upstream: N/A | Commit:
Branch: | 763f93c95ecf8e79ff48339491212a6417d2c4f8
public/ticket/10194 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Description changed by chapoton:
Old description:
> At Sage days 30, a long brainstorm seems to have finalized the design.
> Here is a excerpt 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]
New description:
At Sage days 30, a long brainstorm seems to have finalized the design.
Here is a excerpt 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
--
--
Ticket URL: <http://trac.sagemath.org/ticket/10194#comment:66>
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.