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

Commit

Permalink
trac #14444 repairing the broken doctests (sorry)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed May 11, 2014
1 parent 680184f commit d1dc38f
Showing 1 changed file with 42 additions and 43 deletions.
85 changes: 42 additions & 43 deletions src/sage/combinat/cluster_algebra_quiver/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,10 @@ def qmu_save(self,filename=None):
Make sure we can save quivers with `m != n` frozen variables, see :trac:`14851`::
sage: S=ClusterSeed(['A',3])
sage: T1=S.principal_extension()
sage: T2=T1.principal_extension(ignore_coefficients=True)
sage: Q=T2.quiver()
sage: S = ClusterSeed(['A',3])
sage: T1 = S.principal_extension()
sage: T2 = T1.principal_extension(ignore_coefficients=True)
sage: Q = T2.quiver()
sage: Q.qmu_save(os.path.join(SAGE_TMP, 'sage.qmu'))
"""
M = self.b_matrix()
Expand Down Expand Up @@ -679,28 +679,28 @@ def b_matrix(self):
EXAMPLES::
sage: ClusterQuiver(['A',4]).b_matrix()
[0 1 0 0]
[ 0 1 0 0]
[-1 0 -1 0]
[0 1 0 1]
[0 0 -1 0]
[ 0 1 0 1]
[ 0 0 -1 0]
sage: ClusterQuiver(['B',4]).b_matrix()
[0 1 0 0]
[ 0 1 0 0]
[-1 0 -1 0]
[0 1 0 1]
[0 0 -2 0]
[ 0 1 0 1]
[ 0 0 -2 0]
sage: ClusterQuiver(['D',4]).b_matrix()
[0 1 0 0]
[ 0 1 0 0]
[-1 0 -1 -1]
[0 1 0 0]
[0 1 0 0]
[ 0 1 0 0]
[ 0 1 0 0]
sage: ClusterQuiver(QuiverMutationType([['A',2],['B',2]])).b_matrix()
[0 1 0 0]
[ 0 1 0 0]
[-1 0 0 0]
[0 0 0 1]
[0 0 -2 0]
[ 0 0 0 1]
[ 0 0 -2 0]
"""
return copy(self._M)

Expand Down Expand Up @@ -826,7 +826,7 @@ def mutation_type(self):
sage: Q = ClusterQuiver([['A', 3], ['B', 3]])
sage: Q._mutation_type = None
sage: Q.mutation_type()
[['A', 3], ['B', 3]]
[ ['A', 3], ['B', 3] ]
sage: Q = ClusterQuiver([['A', 3], ['T', [4,4,4]]])
sage: Q._mutation_type = None
Expand Down Expand Up @@ -962,13 +962,13 @@ def canonical_label(self, certify=False):
{0: 0, 1: 3, 2: 1, 3: 2}
sage: Q = ClusterQuiver(QuiverMutationType([['B',2],['A',1]])); Q
Quiver on 3 vertices of type [['B', 2], ['A', 1]]
Quiver on 3 vertices of type [ ['B', 2], ['A', 1] ]
sage: Q.canonical_label()
Quiver on 3 vertices of type [['A', 1], ['B', 2]]
Quiver on 3 vertices of type [ ['A', 1], ['B', 2] ]
sage: Q.canonical_label(certify=True)
(Quiver on 3 vertices of type [['A', 1], ['B', 2]], {0: 1, 1: 2, 2: 0})
(Quiver on 3 vertices of type [ ['A', 1], ['B', 2] ], {0: 1, 1: 2, 2: 0})
"""
n = self._n
m = self._m
Expand Down Expand Up @@ -1105,16 +1105,16 @@ def mutate(self, data, inplace=True):
EXAMPLES::
sage: Q = ClusterQuiver(['A',4]); Q.b_matrix()
[0 1 0 0]
[ 0 1 0 0]
[-1 0 -1 0]
[0 1 0 1]
[0 0 -1 0]
[ 0 1 0 1]
[ 0 0 -1 0]
sage: Q.mutate(0); Q.b_matrix()
[0 -1 0 0]
[1 0 -1 0]
[0 1 0 1]
[0 0 -1 0]
[ 0 -1 0 0]
[ 1 0 -1 0]
[ 0 1 0 1]
[ 0 0 -1 0]
sage: T = Q.mutate(0, inplace=False); T
Quiver on 4 vertices of type ['A', 4]
Expand All @@ -1125,17 +1125,17 @@ def mutate(self, data, inplace=True):
sage: Q.mutate([0,1,0])
sage: Q.b_matrix()
[0 -1 1 0]
[1 0 0 0]
[ 0 -1 1 0]
[ 1 0 0 0]
[-1 0 0 1]
[0 0 -1 0]
[ 0 0 -1 0]
sage: Q = ClusterQuiver(QuiverMutationType([['A',1],['A',3]]))
sage: Q.b_matrix()
[0 0 0 0]
[0 0 1 0]
[0 -1 0 -1]
[0 0 1 0]
[ 0 0 0 0]
[ 0 0 1 0]
[ 0 -1 0 -1]
[ 0 0 1 0]
sage: T = Q.mutate(0,inplace=False)
sage: Q == T
Expand Down Expand Up @@ -1202,11 +1202,11 @@ def mutation_sequence(self, sequence, show_sequence=False, fig_size=1.2):
[Quiver on 4 vertices of type ['A', 4], Quiver on 4 vertices of type ['A', 4], Quiver on 4 vertices of type ['A', 4]]
sage: [T.b_matrix() for T in seq]
[
[0 1 0 0] [0 -1 0 0] [0 1 -1 0]
[-1 0 -1 0] [1 0 -1 0] [-1 0 1 0]
[0 1 0 1] [0 1 0 1] [1 -1 0 1]
[0 0 -1 0], [0 0 -1 0], [0 0 -1 0]
]
[ 0 1 0 0] [ 0 -1 0 0] [ 0 1 -1 0]
[-1 0 -1 0] [ 1 0 -1 0] [-1 0 1 0]
[ 0 1 0 1] [ 0 1 0 1] [ 1 -1 0 1]
[ 0 0 -1 0], [ 0 0 -1 0], [ 0 0 -1 0]
]
"""
from sage.plot.plot import Graphics
from sage.plot.text import text
Expand Down Expand Up @@ -1400,11 +1400,10 @@ def mutation_class_iter(self, depth=infinity, show_depth=False, return_paths=Fal
sage: it = Q.mutation_class_iter(return_paths=True,data_type='matrix')
sage: it.next()
(
[0 0 1]
[0 0 1]
[ 0 0 1]
[ 0 0 1]
[-1 -1 0], []
)
)
"""
if data_type == 'path':
return_paths = False
Expand Down

0 comments on commit d1dc38f

Please sign in to comment.