Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix typo in cluster_seed.py
Browse files Browse the repository at this point in the history
  • Loading branch information
roed314 committed Aug 23, 2017
1 parent 037272c commit c65e4ab
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
Expand Up @@ -4250,6 +4250,17 @@ def greedy(self, a1, a2, algorithm='by_recursion'):
(x0^4 + 2*x0^2 + x1^2 + 1)/(x0*x1^2)
sage: S.greedy(1, 2, 'by_combinatorics')
(x0^4 + 2*x0^2 + x1^2 + 1)/(x0*x1^2)
TESTS:
We check that :trac:`23688` has been resolved::
sage: S = ClusterSeed(Matrix([[0,1],[-4,0]])); S
A seed for a cluster algebra of rank 2
sage: S.greedy(1,2)
(x1^4 + x0^2 + 2*x0 + 1)/(x0*x1^2)
sage: S.greedy(1,2,'by_combinatorics')
(x1^4 + x0^2 + 2*x0 + 1)/(x0*x1^2)
"""
if self.b_matrix().dimensions() == (2, 2):
b = abs(self.b_matrix()[0, 1])
Expand Down Expand Up @@ -4279,7 +4290,7 @@ def greedy(self, a1, a2, algorithm='by_recursion'):
evenT = set(T).symmetric_difference(oddT)
ans = ans + S.x(0)**(b*len(evenT)) * S.x(1)**(c*len(oddT))
elif a1 < a2:
if is_LeeLiZel_allowable(T, a2, a1, b, c):
if is_LeeLiZel_allowable(T, a2, a1, c, b):
oddT = set(T).intersection(PathSubset(a2, 0))
evenT = set(T).symmetric_difference(oddT)
ans = ans + S.x(0)**(b*len(oddT)) * S.x(1)**(c*len(evenT))
Expand Down

0 comments on commit c65e4ab

Please sign in to comment.