Ticket #14141: trac_14141-add-r-fs.patch

File trac_14141-add-r-fs.patch, 7.2 KB (added by saliola, 8 years ago)
  • sage/combinat/knutson_tao_puzzles.py

    # HG changeset patch
    # User Franco Saliola <saliola@gmail.com>
    # Date 1368736869 14400
    # Node ID 1d1ff467d207c710f6ad3f8e2652b2944eedf6f0
    # Parent  0c3a344c14bf71c8e7d444ee80ebc02c2fbae9b5
    [mq]: trac_14141-add-r-fs.patch
    
    diff --git a/sage/combinat/knutson_tao_puzzles.py b/sage/combinat/knutson_tao_puzzles.py
    a b class PuzzlePiece(object): 
    6060    """
    6161
    6262    def __eq__(self, other):
    63         """
     63        r"""
    6464        TESTS::
    6565
    6666            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece
    class PuzzlePiece(object): 
    7878            return False
    7979
    8080    def __hash__(self):
    81         """
     81        r"""
    8282        TESTS::
    8383
    8484            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece
    class PuzzlePiece(object): 
    8989        return hash((type(self), self.border()))
    9090
    9191    def border(self):
    92         """
     92        r"""
    9393        Returns the border of ``self``.
    9494
    9595        EXAMPLES::
    class PuzzlePiece(object): 
    102102        return tuple(self.edge_label(edge) for edge in self.edges())
    103103
    104104    def color(self):
    105         """
     105        r"""
    106106        Returns the color of ``self``.
    107107
    108108        EXAMPLES::
    class PuzzlePiece(object): 
    144144        return color
    145145
    146146    def _plot_label(self, label, coords, fontcolor=(0.3,0.3,0.3), fontsize=15, rotation=0):
    147         """
     147        r"""
    148148        TESTS::
    149149
    150150            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece
    class PuzzlePiece(object): 
    157157            return Graphics()
    158158
    159159    def _plot_piece(self, coords, border_color=(0.5,0.5,0.5), border_thickness=1, style='fill'):
    160         """
     160        r"""
    161161        TESTS::
    162162
    163163            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece
    class PuzzlePiece(object): 
    211211        return color
    212212
    213213    def edge_label(self, edge):
    214         """
     214        r"""
    215215        Return the edge label of ``edge``.
    216216
    217217        EXAMPLES::
    class RhombusPiece(PuzzlePiece): 
    428428        2/\3  6\/5
    429429    """
    430430    def __init__(self, north_piece, south_piece):
    431         """
     431        r"""
    432432        EXAMPLES::
    433433
    434434            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece, NablaPiece, RhombusPiece
    class RhombusPiece(PuzzlePiece): 
    491491        return self._south_piece
    492492
    493493    def __repr__(self):
    494         """
     494        r"""
    495495        EXAMPLES::
    496496
    497497            sage: from sage.combinat.knutson_tao_puzzles import DeltaPiece, NablaPiece, RhombusPiece
    class PuzzlePieces(object): 
    548548        1/\1  10\/0, 1/\1  1\/1, 10/\1  0\/0, 10/\1  1\/10]
    549549    """
    550550    def __init__(self, forbidden_border_labels=None):
    551         """
     551        r"""
    552552        INPUT:
    553553
    554554        - ``forbidden_border_labels`` -- list of forbidden border labels given as strings
    class PuzzlePieces(object): 
    576576        self._forbidden_border_labels = forbidden_border_labels
    577577
    578578    def __eq__(self, other):
    579         """
     579        r"""
    580580        TESTS::
    581581
    582582            sage: from sage.combinat.knutson_tao_puzzles import H_grassmannian_pieces
    class PuzzlePieces(object): 
    591591            return False
    592592
    593593    def __hash__(self):
    594         """
     594        r"""
    595595        TESTS::
    596596
    597597            sage: from sage.combinat.knutson_tao_puzzles import H_grassmannian_pieces
    class PuzzlePieces(object): 
    701701        self.add_piece(NablaPiece('T%s|%s' % (label1, label2), label1, label2), rotations=180)
    702702
    703703    def __repr__(self):
    704         """
     704        r"""
    705705        TESTS::
    706706
    707707            sage: from sage.combinat.knutson_tao_puzzles import PuzzlePieces, DeltaPiece
    class PuzzlePieces(object): 
    717717        return s
    718718
    719719    def delta_pieces(self):
    720         """
     720        r"""
    721721        Returns the delta pieces as a set.
    722722
    723723        EXAMPLES::
    class PuzzlePieces(object): 
    732732        return self._delta_pieces
    733733
    734734    def nabla_pieces(self):
    735         """
     735        r"""
    736736        Returns the nabla pieces as a set.
    737737
    738738        EXAMPLES::
    class PuzzlePieces(object): 
    770770        return rhombi
    771771
    772772    def boundary_deltas(self):
    773         """
     773        r"""
    774774        Returns deltas with south edges not in the forbidden list.
    775775
    776776        EXAMPLES::
    class PuzzleFilling(object): 
    960960    Create partial puzzles and provides methods to build puzzles from them.
    961961    """
    962962    def __init__(self, north_west_labels, north_east_labels):
    963         """
     963        r"""
    964964        TESTS::
    965965
    966966            sage: from sage.combinat.knutson_tao_puzzles import PuzzleFilling
    class PuzzleFilling(object): 
    975975        self._kink_coordinates = (1, self._n)
    976976
    977977    def __getitem__(self, key):
    978         """
     978        r"""
    979979        TESTS::
    980980
    981981            sage: from sage.combinat.knutson_tao_puzzles import KnutsonTaoPuzzleSolver
    class PuzzleFilling(object): 
    10091009        return self._kink_coordinates
    10101010
    10111011    def is_in_south_edge(self):
    1012         """
     1012        r"""
    10131013        Checks whether kink coordinates of partial puzzle is in south corner.
    10141014
    10151015        EXAMPLES::
    class PuzzleFilling(object): 
    10231023        return i == j
    10241024
    10251025    def north_west_label_of_kink(self):
    1026         """
     1026        r"""
    10271027        Return north-west label of kink.
    10281028
    10291029        EXAMPLES::
    class PuzzleFilling(object): 
    10401040            return self._squares[i-1,j]['south_east']
    10411041
    10421042    def north_east_label_of_kink(self):
    1043         """
     1043        r"""
    10441044        Return north east label of kink.
    10451045
    10461046        EXAMPLES::
    class PuzzleFilling(object): 
    10571057            return self._squares[i,j+1]['south_west']
    10581058
    10591059    def is_completed(self):
    1060         """
     1060        r"""
    10611061        Whether partial puzzle is complete (completely filled) or not.
    10621062
    10631063        EXAMPLES::
    class PuzzleFilling(object): 
    10771077        return i == self._n + 1
    10781078
    10791079    def south_labels(self):
    1080         """
     1080        r"""
    10811081        Return south labels for completed puzzle.
    10821082
    10831083        EXAMPLES::
    class PuzzleFilling(object): 
    11881188        return z
    11891189
    11901190    def __repr__(self):
    1191         """
     1191        r"""
    11921192        TESTS::
    11931193
    11941194            sage: from sage.combinat.knutson_tao_puzzles import H_grassmannian_pieces, PuzzleFilling
    class PuzzleFilling(object): 
    12001200        return str(self._squares)
    12011201
    12021202    def __iter__(self):
    1203         """
     1203        r"""
    12041204        Iterator.
    12051205
    12061206        TESTS::
    class KnutsonTaoPuzzleSolver(UniqueRepre 
    15551555
    15561556    @staticmethod
    15571557    def __classcall_private__(cls, puzzle_pieces, max_letter=None):
    1558         """
     1558        r"""
    15591559        TESTS::
    15601560
    15611561            sage: from sage.combinat.knutson_tao_puzzles import *
    class KnutsonTaoPuzzleSolver(UniqueRepre 
    15911591        return super(KnutsonTaoPuzzleSolver, cls).__classcall__(cls, puzzle_pieces)
    15921592
    15931593    def __call__(self, lamda, mu, algorithm='strips'):
    1594         """
     1594        r"""
    15951595        TESTS::
    15961596
    15971597            sage: from sage.combinat.knutson_tao_puzzles import KnutsonTaoPuzzleSolver
    class KnutsonTaoPuzzleSolver(UniqueRepre 
    16121612    solutions = __call__
    16131613
    16141614    def __repr__(self):
    1615         """
     1615        r"""
    16161616        EXAMPLES::
    16171617
    16181618            sage: from sage.combinat.knutson_tao_puzzles import KnutsonTaoPuzzleSolver