Ticket #13425: trac_13425review_fivecs.patch
File trac_13425review_fivecs.patch, 4.5 KB (added by , 6 years ago) 


sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
# HG changeset patch # User Christian Stump <christian.stump at gmail.com> # Date 1364222722 3600 # Node ID 76cd65f758faf93931bf6107f71263a28b52f080 # Parent c21b4398f55be652478897d112cff384df9f8766 Trac 13425: fixed cmp issue in doctests 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_classical_mutation_classe 1954 1954 1955 1955 sage: from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import _construct_classical_mutation_classes 1956 1956 sage: rank_2_classes = _construct_classical_mutation_classes(2) # long time 1957 sage: for mut_class in sorted(rank_2_classes.keys() ): # long time1957 sage: for mut_class in sorted(rank_2_classes.keys(),key=str): # long time 1958 1958 ... print mut_class, rank_2_classes[mut_class] 1959 ('A', (1, 1), 1) [('AO', (((0, 1), (2, 2)),))] 1959 1960 ('A', 2) [('AO', ())] 1960 ('A', (1, 1), 1) [('AO', (((0, 1), (2, 2)),))]1961 1961 ('B', 2) [('AO', (((0, 1), (1, 2)),)), ('AO', (((0, 1), (2, 1)),))] 1962 1962 ('BC', 1, 1) [('AO', (((0, 1), (1, 4)),)), ('AO', (((0, 1), (4, 1)),))] 1963 1963 """ … … def _construct_exceptional_mutation_clas 2009 2009 2010 2010 sage: from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import _construct_exceptional_mutation_classes 2011 2011 sage: rank_3_exceptional = _construct_exceptional_mutation_classes(3) # long time 2012 sage: for mut_class in sorted(rank_3_exceptional.keys() ): # long time2012 sage: for mut_class in sorted(rank_3_exceptional.keys(), key=str): # long time 2013 2013 ... print mut_class, rank_3_exceptional[mut_class] 2014 2014 ('G', 2, 1) [('BH?', (((1, 2), (1, 3)),)), ('BGO', (((2, 1), (3, 1)),)), ('BW?', (((0, 1), (3, 1)),)), ('BP?', (((0, 1), (1, 3)),)), 2015 2015 ('BP_', (((0, 1), (1, 3)), ((2, 0), (3, 1)))), ('BP_', (((0, 1), (3, 1)), ((1, 2), (1, 3)), ((2, 0), (2, 2))))] … … def _save_data_dig6(n, types='ClassicalE 2070 2070 [('A', 1)] 2071 2071 <BLANKLINE> 2072 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)]2073 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1), ('G', 2)] 2074 2074 2075 2075 sage: save_quiver_data(2,up_to=False) # indirect doctest 2076 2076 <BLANKLINE> 2077 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)]2078 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1), ('G', 2)] 2079 2079 2080 2080 sage: save_quiver_data(2,up_to=False, types='Classical') # indirect doctest 2081 2081 <BLANKLINE> 2082 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)]2083 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1)] 2084 2084 2085 2085 sage: save_quiver_data(2,up_to=False, types='Exceptional') # indirect doctest 2086 2086 <BLANKLINE> … … def _save_data_dig6(n, types='ClassicalE 2109 2109 cPickle.dump(data, f) 2110 2110 f.close() 2111 2111 if verbose: 2112 keys = data.keys() 2113 keys.sort() 2112 keys = sorted(data.keys(),key=str) 2114 2113 print "\nThe following types are saved to file", types_file,"and will now be used to determine quiver mutation types:" 2115 2114 print keys 2116 2115 … … def save_quiver_data(n, up_to=True, type 2140 2139 [('A', 1)] 2141 2140 <BLANKLINE> 2142 2141 The following types are saved to file ... and will now be used to determine quiver mutation types: 2143 [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]2142 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1), ('G', 2)] 2144 2143 2145 2144 sage: save_quiver_data(2,up_to=False) 2146 2145 <BLANKLINE> 2147 2146 The following types are saved to file ... and will now be used to determine quiver mutation types: 2148 [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1), ('G', 2)]2147 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1), ('G', 2)] 2149 2148 2150 2149 sage: save_quiver_data(2,up_to=False, types='Classical') 2151 2150 <BLANKLINE> 2152 2151 The following types are saved to file ... and will now be used to determine quiver mutation types: 2153 [('A', 2), ('A', (1, 1), 1), ('B', 2), ('BC', 1, 1)]2152 [('A', (1, 1), 1), ('A', 2), ('B', 2), ('BC', 1, 1)] 2154 2153 2155 2154 sage: save_quiver_data(2,up_to=False, types='Exceptional') 2156 2155 <BLANKLINE>