예제 #1
0
    def __iter__(self):
        """
        An iterator for the standard ribbon of ``self``.

        EXAMPLES::

            sage: [t for t in StandardRibbonShapedTableaux([2,2])]
            [[[None, 2, 4], [1, 3]],
             [[None, 2, 3], [1, 4]],
             [[None, 1, 4], [2, 3]],
             [[None, 1, 3], [2, 4]],
             [[None, 1, 2], [3, 4]]]
        """
        for p in descents_composition_list(self.shape):
            yield self.from_permutation(p)
예제 #2
0
    def __iter__(self):
        """
        An iterator for the standard ribbon of ``self``.

        EXAMPLES::

            sage: [t for t in StandardRibbonShapedTableaux([2,2])]
            [[[None, 2, 4], [1, 3]],
             [[None, 2, 3], [1, 4]],
             [[None, 1, 4], [2, 3]],
             [[None, 1, 3], [2, 4]],
             [[None, 1, 2], [3, 4]]]
        """
        for p in descents_composition_list(self.shape):
            yield self.from_permutation(p)
예제 #3
0
    def __iter__(self):
        """
        An iterator for the standard ribbon of ribbon shape shape.

        EXAMPLES::

            sage: [t for t in StandardRibbons([2,2])]
            [[[2, 4], [1, 3]],
             [[2, 3], [1, 4]],
             [[1, 4], [2, 3]],
             [[1, 3], [2, 4]],
             [[1, 2], [3, 4]]]
        """

        for p in permutation.descents_composition_list(self.shape):
            yield from_permutation(p)
예제 #4
0
파일: ribbon.py 프로젝트: bgxcpku/sagelib
    def __iter__(self):
        """
        An iterator for the standard ribbon of ribbon shape shape.
        
        EXAMPLES::
        
            sage: [t for t in StandardRibbons([2,2])]
            [[[2, 4], [1, 3]],
             [[2, 3], [1, 4]],
             [[1, 4], [2, 3]],
             [[1, 3], [2, 4]],
             [[1, 2], [3, 4]]]
        """

        for p in permutation.descents_composition_list(self.shape):
            yield from_permutation(p)