Finite combinatorial classes

class sage.combinat.finite_class.FiniteCombinatorialClass(l)

Bases: sage.combinat.combinat.CombinatorialClass

INPUT:
  • l a list or iterable

Returns l, wrapped as a combinatorial class

EXAMPLES:

sage: F = FiniteCombinatorialClass([1,2,3])
sage: F.list()
[1, 2, 3]
sage: F.cardinality()
3
sage: F.random_element()
1
sage: F.first()
1
sage: F.last()
3
cardinality()

EXAMPLES:

sage: F = FiniteCombinatorialClass([1,2,3])
sage: F.cardinality()
3
keys()

EXAMPLES:

sage: F = FiniteCombinatorialClass([1,2,3])
sage: F.keys()
[0, 1, 2]
list()

TESTS:

sage: F = FiniteCombinatorialClass([1,2,3])
sage: F.list()
[1, 2, 3]
sage.combinat.finite_class.FiniteCombinatorialClass_l

alias of FiniteCombinatorialClass

Previous topic

Substitutions over unit cube faces (Rauzy fractals)

Next topic

Hall Polynomials

This Page