Ticket #13425: trac_13425-review-cs.patch

File trac_13425-review-cs.patch, 5.4 KB (added by stumpc5, 6 years ago)
  • sage/combinat/cluster_algebra_quiver/cluster_seed.py

    # HG changeset patch
    # User Christian Stump <christian.stump at gmail.com>
    # Date 1363716561 -3600
    # Node ID 5dd0c68446bf57a22b6b5737cce32989a512f289
    # Parent  c27de5fd4ceef69e2511d9558c766e404b15e6ef
    Trac 13425: review
    
    diff --git a/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/sage/combinat/cluster_algebra_quiver/cluster_seed.py
    a b class ClusterSeed(SageObject): 
    18531853
    18541854            sage: S = ClusterSeed(['D',4,1])
    18551855            sage: S._mutation_type = S._quiver._mutation_type = None
    1856             sage: S.mutation_type()    #indirect doctest
    1857             'undetermined finite mutation type'
     1856            sage: S.mutation_type() # todo: not implemented
     1857            ['D', 4, 1]
    18581858
    18591859        - the exceptional types::
    18601860
  • sage/combinat/cluster_algebra_quiver/quiver.py

    diff --git a/sage/combinat/cluster_algebra_quiver/quiver.py b/sage/combinat/cluster_algebra_quiver/quiver.py
    a b class ClusterQuiver(SageObject): 
    749749
    750750            sage: Q = ClusterQuiver(['D',4,1])
    751751            sage: Q._mutation_type = None
    752             sage: Q.mutation_type()    #indirect doctest
    753             'undetermined finite mutation type'
     752            sage: Q.mutation_type() # todo: not implemented
     753            ['D', 4, 1]
    754754
    755755        - the exceptional types::
    756756
    class ClusterQuiver(SageObject): 
    15271527        False
    15281528        """
    15291529        mt = self.mutation_type()
    1530         if type(mt) in (str, list) :
     1530        if type( mt ) in [QuiverMutationType_Irreducible, QuiverMutationType_Reducible] and mt.is_finite():
     1531            return True
     1532        else:
    15311533            return False
    1532         else:
    1533             return mt.is_finite()
    15341534
    15351535    def is_mutation_finite( self, nr_of_checks=None, return_path=False ):
    15361536        """
  • sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py

    diff --git a/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
    a b def _construct_exceptional_mutation_clas 
    20602060def _save_data_dig6(n, types='ClassicalExceptional', verbose=False):
    20612061    """
    20622062    Saves all exceptional mutation classes as dig6 data into the file ``exc_classes_n.dig6`` in the folder ``SAGE_SHARE``.
     2063
     2064    TESTS::
     2065
     2066        sage: from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import save_quiver_data
     2067        sage: save_quiver_data(2) # indirect doctest
     2068        <BLANKLINE>
     2069        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2070        [('A', 1)]
     2071        <BLANKLINE>
     2072        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2073        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]
     2074
     2075        sage: save_quiver_data(2,up_to=False) # indirect doctest
     2076        <BLANKLINE>
     2077        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2078        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]
     2079
     2080        sage: save_quiver_data(2,up_to=False, types='Classical') # indirect doctest
     2081        <BLANKLINE>
     2082        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2083        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1)]
     2084
     2085        sage: save_quiver_data(2,up_to=False, types='Exceptional') # indirect doctest
     2086        <BLANKLINE>
     2087        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2088        [('G', 2)]
     2089
     2090        sage: save_quiver_data(2,up_to=False, verbose=False) # indirect doctest
    20632091    """
    20642092    import os.path
    20652093    import cPickle
    def save_quiver_data(n, up_to=True, type 
    21032131
    21042132    - ``types`` -- (default:'ClassicalExceptional') if all, saves data for both exceptional mutation-finite quivers and for classical quiver.
    21052133      The input 'Exceptional' or 'Classical' is also allowed to save only part of this data.
     2134
     2135    TESTS::
     2136
     2137        sage: from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import save_quiver_data
     2138        sage: save_quiver_data(2)
     2139        <BLANKLINE>
     2140        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2141        [('A', 1)]
     2142        <BLANKLINE>
     2143        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2144        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]
     2145
     2146        sage: save_quiver_data(2,up_to=False)
     2147        <BLANKLINE>
     2148        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2149        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]
     2150
     2151        sage: save_quiver_data(2,up_to=False, types='Classical')
     2152        <BLANKLINE>
     2153        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2154        [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1)]
     2155
     2156        sage: save_quiver_data(2,up_to=False, types='Exceptional')
     2157        <BLANKLINE>
     2158        The following types are saved to file ... and will now be used to determine quiver mutation types:
     2159        [('G', 2)]
     2160
     2161        sage: save_quiver_data(2,up_to=False, verbose=False)
    21062162    """
    21072163    if up_to is True:
    21082164        ranks = range(1,n+1)