Skip to content

Commit

Permalink
fix suggested details
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Mar 6, 2024
1 parent 21ac678 commit 32799a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/sage/combinat/cluster_algebra_quiver/mutation_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _triangles(dg):
return trians


def _all_induced_cycles_iter( dg ):
def _all_induced_cycles_iter(dg):
"""
Return an iterator for all induced oriented cycles of length
greater than or equal to 4 in the digraph ``dg``.
Expand Down Expand Up @@ -356,9 +356,9 @@ def _connected_mutation_type(dg):
for edge in edges:
label = edge[2]
if label not in [(1,-1),(2,-2),(1,-2),(2,-1),(4,-1),(1,-4)]:
# _false_return(i) is a simple function that simply returns 'unknown'. For debugging purposes, it
# can also output 'DEBUG: error i' if desired.
# this command is used many times in this code, something times without the argument i.
# _false_return(i) is a simple function that simply returns 'unknown'. For debugging purposes, it
# can also output 'DEBUG: error i' if desired.
# this command is used many times in this code, something times without the argument i.
return _false_return(2)
elif label == (2,-2):
dg.set_edge_label( edge[0], edge[1], 1 )
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def _connected_mutation_type_AAtildeD(dg, ret_conn_vert=False):
test_triangles = [[tuple(trian) for trian in oriented_trians

Check warning on line 1032 in src/sage/combinat/cluster_algebra_quiver/mutation_type.py

View check run for this annotation

Codecov / codecov/patch

src/sage/combinat/cluster_algebra_quiver/mutation_type.py#L1032

Added line #L1032 was not covered by tests
if edge in trian]
for edge in multiple_trian_edges]
unique_triangle = set(test_triangles[0]).intersection( *test_triangles[1:] )
unique_triangle = set.intersection(*map(set, test_triangles))
if len(unique_triangle) != 1:

Check warning on line 1036 in src/sage/combinat/cluster_algebra_quiver/mutation_type.py

View check run for this annotation

Codecov / codecov/patch

src/sage/combinat/cluster_algebra_quiver/mutation_type.py#L1035-L1036

Added lines #L1035 - L1036 were not covered by tests
return _false_return(19)
else:
Expand Down Expand Up @@ -1299,7 +1299,7 @@ def load_data(n, user=True):
return data


def _mutation_type_from_data( n, dig6, compute_if_necessary=True ):
def _mutation_type_from_data(n, dig6, compute_if_necessary=True):
r"""
Return the mutation type from the given dig6 data by looking into
the precomputed mutation types
Expand Down Expand Up @@ -1506,7 +1506,7 @@ def _random_tests(mt, k, mut_class=None, nr_mut=5):
dg = dg_new


def _random_multi_tests( n, k, nr_mut=5 ):
def _random_multi_tests(n, k, nr_mut=5):
"""
Provide multiple random tests to find bugs in the mutation type methods.
Expand Down
8 changes: 5 additions & 3 deletions src/sage/combinat/plane_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,19 @@ def x_tableau(self, tableau=True) -> Tableau:
return Tableau(X)
return X

def cells(self) -> list[list[int]]:
def cells(self) -> list[tuple[int, int, int]]:
r"""
Return the list of cells inside ``self``.
Each cell is a tuple.
EXAMPLES::
sage: PP = PlanePartition([[3,1],[2]])
sage: PP.cells()
[[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 1, 0], [1, 0, 0], [1, 0, 1]]
[(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (1, 0, 0), (1, 0, 1)]
"""
return [[r, c, h]
return [(r, c, h)
for r in range(len(self))
for c in range(len(self[r]))
for h in range(self[r][c])]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -2618,7 +2618,7 @@ def slide_multiply(self, other):

l = len(self[0])
st = [(None,) * l + row for row in other]
st.extend(row for row in self)
st.extend(self)

from sage.combinat.skew_tableau import SkewTableau
return SkewTableau(st).rectify()
Expand Down

0 comments on commit 32799a6

Please sign in to comment.