Ticket #13425: trac_13425reviewcs.patch
File trac_13425reviewcs.patch, 5.4 KB (added by , 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): 1853 1853 1854 1854 sage: S = ClusterSeed(['D',4,1]) 1855 1855 sage: S._mutation_type = S._quiver._mutation_type = None 1856 sage: S.mutation_type() #indirect doctest1857 'undetermined finite mutation type'1856 sage: S.mutation_type() # todo: not implemented 1857 ['D', 4, 1] 1858 1858 1859 1859  the exceptional types:: 1860 1860 
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): 749 749 750 750 sage: Q = ClusterQuiver(['D',4,1]) 751 751 sage: Q._mutation_type = None 752 sage: Q.mutation_type() #indirect doctest753 'undetermined finite mutation type'752 sage: Q.mutation_type() # todo: not implemented 753 ['D', 4, 1] 754 754 755 755  the exceptional types:: 756 756 … … class ClusterQuiver(SageObject): 1527 1527 False 1528 1528 """ 1529 1529 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: 1531 1533 return False 1532 else:1533 return mt.is_finite()1534 1534 1535 1535 def is_mutation_finite( self, nr_of_checks=None, return_path=False ): 1536 1536 """ 
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 2060 2060 def _save_data_dig6(n, types='ClassicalExceptional', verbose=False): 2061 2061 """ 2062 2062 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 2063 2091 """ 2064 2092 import os.path 2065 2093 import cPickle … … def save_quiver_data(n, up_to=True, type 2103 2131 2104 2132  ``types``  (default:'ClassicalExceptional') if all, saves data for both exceptional mutationfinite quivers and for classical quiver. 2105 2133 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) 2106 2162 """ 2107 2163 if up_to is True: 2108 2164 ranks = range(1,n+1)