def __init__(self, weights): """ TESTS:: sage: C = WeightedIntegerVectors([2,1,3]) sage: C.__class__ <class 'sage.combinat.integer_vector_weighted.WeightedIntegerVectors_all_with_category'> sage: C.category() Join of Category of sets with grading and Category of infinite enumerated sets sage: TestSuite(C).run() """ self._weights = weights from sage.sets.all import Family, NonNegativeIntegers # Use "partial" to make the basis function (with the weights # argument specified) pickleable. Otherwise, it seems to # cause problems... from functools import partial F = Family(NonNegativeIntegers(), partial(WeightedIntegerVectors, weight=weights)) DisjointUnionEnumeratedSets.__init__( self, F, facade=True, keepkey=False, category=(SetsWithGrading(), InfiniteEnumeratedSets()))
def __init__(self): r""" TESTS:: sage: TestSuite(SetsWithGrading().example()).run() """ Parent.__init__(self, category=SetsWithGrading(), facade=IntegerRing())
def __init__(self): """ TESTS:: sage: PF = ParkingFunctions() sage: TestSuite(PF).run() """ cat = InfiniteEnumeratedSets() & SetsWithGrading() Parent.__init__(self, category=cat)
def __init__(self): """ TESTS:: sage: PF = NonDecreasingParkingFunctions() sage: PF == loads(dumps(PF)) True """ cat = InfiniteEnumeratedSets() & SetsWithGrading() Parent.__init__(self, category=cat)