Skip to content

Commit bddb7fc

Browse files
author
Matthias Koeppe
committed
sage.combinat.species: Update # needs
1 parent 7cdec9b commit bddb7fc

File tree

5 files changed

+53
-46
lines changed

5 files changed

+53
-46
lines changed

src/sage/combinat/species/composition_species.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,22 @@ def _structures(self, structure_class, labels):
145145
146146
TESTS::
147147
148-
sage: a = _[2] # needs sage.libs.flint
149-
sage: f, gs = a._list # needs sage.libs.flint
150-
sage: f # needs sage.libs.flint
148+
sage: # needs sage.libs.flint
149+
sage: a = _[2]
150+
sage: f, gs = a._list
151+
sage: f
151152
{{'a', 'c'}, {'b'}}
152-
sage: f.parent() # needs sage.libs.flint
153+
sage: f.parent()
153154
Set species
154-
sage: f._list # needs sage.libs.flint
155+
sage: f._list
155156
[1, 2]
156-
sage: f._labels # needs sage.libs.flint
157+
sage: f._labels
157158
[{'a', 'c'}, {'b'}]
158-
sage: [g.parent() for g in gs] # needs sage.libs.flint
159+
sage: [g.parent() for g in gs]
159160
[Cyclic permutation species, Cyclic permutation species]
160-
sage: [g._labels for g in gs] # needs sage.libs.flint
161+
sage: [g._labels for g in gs]
161162
[['a', 'c'], ['b']]
162-
sage: [g._list for g in gs] # needs sage.libs.flint
163+
sage: [g._list for g in gs]
163164
[[1, 2], [1]]
164165
"""
165166
from itertools import product

src/sage/combinat/species/generating_series.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@
1515
1616
TESTS::
1717
18+
sage: # needs sage.modules
1819
sage: from sage.combinat.species.generating_series import CycleIndexSeriesRing
19-
sage: p = SymmetricFunctions(QQ).power() # needs sage.modules
20-
sage: CIS = CycleIndexSeriesRing(QQ) # needs sage.modules
21-
sage: geo1 = CIS(lambda i: p([1])^i) # needs sage.modules
22-
sage: geo2 = CIS(lambda i: p([2])^(i // 2) if is_even(i) else 0) # needs sage.modules
23-
sage: s = geo1 * geo2 # needs sage.modules
24-
sage: s[0] # needs sage.modules
20+
sage: p = SymmetricFunctions(QQ).power()
21+
sage: CIS = CycleIndexSeriesRing(QQ)
22+
sage: geo1 = CIS(lambda i: p([1])^i)
23+
sage: geo2 = CIS(lambda i: p([2])^(i // 2) if is_even(i) else 0)
24+
sage: s = geo1 * geo2
25+
sage: s[0]
2526
p[]
26-
sage: s[1] # needs sage.modules
27+
sage: s[1]
2728
p[1]
28-
sage: s[2] # needs sage.modules
29+
sage: s[2]
2930
p[1, 1] + p[2]
30-
sage: s[3] # needs sage.modules
31+
sage: s[3]
3132
p[1, 1, 1] + p[2, 1]
3233
3334
REFERENCES:
@@ -292,15 +293,16 @@ def count(self, t):
292293
293294
EXAMPLES::
294295
296+
sage: # needs sage.modules
295297
sage: from sage.combinat.species.generating_series import CycleIndexSeriesRing
296-
sage: p = SymmetricFunctions(QQ).power() # needs sage.modules
297-
sage: CIS = CycleIndexSeriesRing(QQ) # needs sage.modules
298-
sage: f = CIS([0, p([1]), 2*p([1,1]), 3*p([2,1])]) # needs sage.modules
299-
sage: f.count([1]) # needs sage.modules
298+
sage: p = SymmetricFunctions(QQ).power()
299+
sage: CIS = CycleIndexSeriesRing(QQ)
300+
sage: f = CIS([0, p([1]), 2*p([1,1]), 3*p([2,1])])
301+
sage: f.count([1])
300302
1
301-
sage: f.count([1,1]) # needs sage.modules
303+
sage: f.count([1,1])
302304
4
303-
sage: f.count([2,1]) # needs sage.modules
305+
sage: f.count([2,1])
304306
6
305307
"""
306308
t = Partition(t)
@@ -312,15 +314,16 @@ def coefficient_cycle_type(self, t):
312314
313315
EXAMPLES::
314316
317+
sage: # needs sage.modules
315318
sage: from sage.combinat.species.generating_series import CycleIndexSeriesRing
316-
sage: p = SymmetricFunctions(QQ).power() # needs sage.modules
317-
sage: CIS = CycleIndexSeriesRing(QQ) # needs sage.modules
318-
sage: f = CIS([0, p([1]), 2*p([1,1]),3*p([2,1])]) # needs sage.modules
319-
sage: f.coefficient_cycle_type([1]) # needs sage.modules
319+
sage: p = SymmetricFunctions(QQ).power()
320+
sage: CIS = CycleIndexSeriesRing(QQ)
321+
sage: f = CIS([0, p([1]), 2*p([1,1]),3*p([2,1])])
322+
sage: f.coefficient_cycle_type([1])
320323
1
321-
sage: f.coefficient_cycle_type([1,1]) # needs sage.modules
324+
sage: f.coefficient_cycle_type([1,1])
322325
2
323-
sage: f.coefficient_cycle_type([2,1]) # needs sage.modules
326+
sage: f.coefficient_cycle_type([2,1])
324327
3
325328
"""
326329
t = Partition(t)

src/sage/combinat/species/partition_species.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _cis(self, series_ring, base_ring):
273273
274274
sage: P = species.PartitionSpecies()
275275
sage: g = P.cycle_index_series() # needs sage.modules
276-
sage: g[0:5]
276+
sage: g[0:5] # needs sage.modules
277277
[p[],
278278
p[1],
279279
p[1, 1] + p[2],

src/sage/combinat/species/product_species.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ def transport(self, perm):
5858
"""
5959
EXAMPLES::
6060
61-
sage: p = PermutationGroupElement((2,3)) # needs sage.groups
62-
sage: S = species.SetSpecies() # needs sage.groups
63-
sage: F = S * S # needs sage.groups
64-
sage: a = F.structures(['a','b','c'])[4]; a # needs sage.groups
61+
sage: # needs sage.groups
62+
sage: p = PermutationGroupElement((2,3))
63+
sage: S = species.SetSpecies()
64+
sage: F = S * S
65+
sage: a = F.structures(['a','b','c'])[4]; a
6566
{'a', 'b'}*{'c'}
66-
sage: a.transport(p) # needs sage.groups
67+
sage: a.transport(p)
6768
{'a', 'c'}*{'b'}
6869
"""
6970
left, right = self._list
@@ -151,12 +152,13 @@ def automorphism_group(self):
151152
"""
152153
EXAMPLES::
153154
154-
sage: p = PermutationGroupElement((2,3)) # needs sage.groups
155-
sage: S = species.SetSpecies() # needs sage.groups
156-
sage: F = S * S # needs sage.groups
157-
sage: a = F.structures([1,2,3,4])[1]; a # needs sage.groups
155+
sage: # needs sage.groups
156+
sage: p = PermutationGroupElement((2,3))
157+
sage: S = species.SetSpecies()
158+
sage: F = S * S
159+
sage: a = F.structures([1,2,3,4])[1]; a
158160
{1}*{2, 3, 4}
159-
sage: a.automorphism_group() # needs sage.groups
161+
sage: a.automorphism_group()
160162
Permutation Group with generators [(2,3), (2,3,4)]
161163
162164
::

src/sage/combinat/species/species.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -739,13 +739,14 @@ def _add_to_digraph(self, d):
739739
740740
EXAMPLES::
741741
742-
sage: d = DiGraph(multiedges=True) # needs sage.graphs
743-
sage: X = species.SingletonSpecies() # needs sage.graphs
744-
sage: X._add_to_digraph(d); d # needs sage.graphs
742+
sage: # needs sage.graphs
743+
sage: d = DiGraph(multiedges=True)
744+
sage: X = species.SingletonSpecies()
745+
sage: X._add_to_digraph(d); d
745746
Multi-digraph on 1 vertex
746-
sage: (X+X)._add_to_digraph(d); d # needs sage.graphs
747+
sage: (X+X)._add_to_digraph(d); d
747748
Multi-digraph on 2 vertices
748-
sage: d.edges(sort=True) # needs sage.graphs
749+
sage: d.edges(sort=True)
749750
[(Sum of (Singleton species) and (Singleton species), Singleton species, None),
750751
(Sum of (Singleton species) and (Singleton species), Singleton species, None)]
751752
"""

0 commit comments

Comments
 (0)