Ejemplo n.º 1
0
    def __init__(self, y, policy):
        r"""
        TESTS::

            sage: from sage.structure.set_factories_example import XYPairs
            sage: TestSuite(XYPairs(y=1)).run()
        """
        self._y = y
        ParentWithSetFactory.__init__(self, (None, y), policy=policy,
                                      category=EnumeratedSets().Finite())
        DisjointUnionEnumeratedSets.__init__(
            self, LazyFamily(range(MAX), self.single_pair),
            facade=True, keepkey=False,
            category=self.category())  # TODO remove and fix disjoint union.
Ejemplo n.º 2
0
    def __init__(self, y, policy):
        r"""
        TESTS::

            sage: from sage.structure.set_factories_example import XYPairs
            sage: TestSuite(XYPairs(y=1)).run()
        """
        self._y = y
        ParentWithSetFactory.__init__(self, (None, y), policy=policy,
                                      category=EnumeratedSets().Finite())
        DisjointUnionEnumeratedSets.__init__(
            self, LazyFamily(range(MAX), self.single_pair),
            facade=True, keepkey=False,
            category=self.category())  # TODO remove and fix disjoint union.
Ejemplo n.º 3
0
    def __init__(self, policy):
        r"""
        TESTS::

            sage: from sage.structure.set_factories_example import XYPairs
            sage: TestSuite(XYPairs()).run()
        """
        ParentWithSetFactory.__init__(self, (), policy=policy,
                                      category=EnumeratedSets().Finite())
        DisjointUnionEnumeratedSets.__init__(self,
                                             LazyFamily(range(MAX),
                                                        self.pairs_y),
                                             facade=True, keepkey=False,
                                             category=self.category())
Ejemplo n.º 4
0
    def __init__(self, policy):
        r"""
        TESTS::

            sage: from sage.structure.set_factories_example import XYPairs
            sage: TestSuite(XYPairs()).run()
        """
        ParentWithSetFactory.__init__(self, (), policy=policy,
                                      category=EnumeratedSets().Finite())
        DisjointUnionEnumeratedSets.__init__(self,
                                             LazyFamily(range(MAX),
                                                        self.pairs_y),
                                             facade=True, keepkey=False,
                                             category=self.category())