Skip to content

Commit 2d595a8

Browse files
author
Matthias Koeppe
committed
./sage --fixdoctests --only-tags src/sage/matroids/*.py
1 parent 69056d1 commit 2d595a8

File tree

5 files changed

+221
-216
lines changed

5 files changed

+221
-216
lines changed

src/sage/matroids/catalog.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ def Q6():
7070
EXAMPLES::
7171
7272
sage: from sage.matroids.advanced import setprint
73-
sage: M = matroids.named_matroids.Q6(); M # optional - sage.rings.finite_rings
73+
sage: M = matroids.named_matroids.Q6(); M # needs sage.rings.finite_rings
7474
Q6: Quaternary matroid of rank 3 on 6 elements
75-
sage: setprint(M.hyperplanes()) # optional - sage.rings.finite_rings
75+
sage: setprint(M.hyperplanes()) # needs sage.rings.finite_rings
7676
[{'a', 'b', 'd'}, {'a', 'c'}, {'a', 'e'}, {'a', 'f'}, {'b', 'c', 'e'},
7777
{'b', 'f'}, {'c', 'd'}, {'c', 'f'}, {'d', 'e'}, {'d', 'f'},
7878
{'e', 'f'}]
79-
sage: M.nonspanning_circuits() == M.noncospanning_cocircuits() # optional - sage.rings.finite_rings
79+
sage: M.nonspanning_circuits() == M.noncospanning_cocircuits() # needs sage.rings.finite_rings
8080
False
8181
"""
8282
F = GF(4, 'x')
@@ -109,7 +109,7 @@ def P6():
109109
{2: {{'a', 'b', 'c'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f'}}}
110110
sage: len(set(M.nonspanning_circuits()).difference(M.nonbases())) == 0
111111
True
112-
sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # optional - sage.rings.finite_rings
112+
sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # needs sage.rings.finite_rings
113113
....: nrows=5)).has_minor(M)
114114
False
115115
sage: M.is_valid()
@@ -310,7 +310,7 @@ def AG32prime():
310310
{'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f', 'h'},
311311
{'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'},
312312
{'d', 'e', 'f', 'g'}]
313-
sage: M.is_valid() # long time # optional - sage.rings.finite_rings
313+
sage: M.is_valid() # long time, needs sage.rings.finite_rings
314314
True
315315
"""
316316
E = 'abcdefgh'
@@ -381,7 +381,7 @@ def F8():
381381
[...True...]
382382
sage: [N.is_isomorphic(matroids.named_matroids.NonFano()) for N in D]
383383
[...True...]
384-
sage: M.is_valid() # long time # optional - sage.rings.finite_rings
384+
sage: M.is_valid() # long time, needs sage.rings.finite_rings
385385
True
386386
"""
387387
E = 'abcdefgh'
@@ -626,7 +626,7 @@ def P8():
626626
P8: Ternary matroid of rank 4 on 8 elements, type 2+
627627
sage: M.is_isomorphic(M.dual())
628628
True
629-
sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # optional - sage.rings.finite_rings
629+
sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # needs sage.rings.finite_rings
630630
....: nrows=5)).has_minor(M)
631631
False
632632
sage: M.bicycle_dimension()
@@ -693,12 +693,12 @@ def K33dual():
693693
694694
EXAMPLES::
695695
696-
sage: M = matroids.named_matroids.K33dual(); M # optional - sage.graphs
696+
sage: M = matroids.named_matroids.K33dual(); M # needs sage.graphs
697697
M*(K3, 3): Regular matroid of rank 4 on 9 elements with 81 bases
698-
sage: any(N.is_3connected() # optional - sage.graphs
698+
sage: any(N.is_3connected() # needs sage.graphs
699699
....: for N in M.linear_extensions(simple=True))
700700
False
701-
sage: M.is_valid() # long time # optional - sage.graphs
701+
sage: M.is_valid() # long time, needs sage.graphs
702702
True
703703
"""
704704
E = 'abcdefghi'
@@ -759,16 +759,16 @@ def CompleteGraphic(n):
759759
EXAMPLES::
760760
761761
sage: from sage.matroids.advanced import setprint
762-
sage: M = matroids.CompleteGraphic(5); M # optional - sage.graphs
762+
sage: M = matroids.CompleteGraphic(5); M # needs sage.graphs
763763
M(K5): Graphic matroid of rank 4 on 10 elements
764-
sage: M.has_minor(matroids.Uniform(2, 4)) # optional - sage.graphs
764+
sage: M.has_minor(matroids.Uniform(2, 4)) # needs sage.graphs
765765
False
766-
sage: simplify(M.contract(randrange(0, # optional - sage.graphs
766+
sage: simplify(M.contract(randrange(0, # needs sage.graphs
767767
....: 10))).is_isomorphic(matroids.CompleteGraphic(4))
768768
True
769-
sage: setprint(M.closure([0, 2, 4, 5])) # optional - sage.graphs
769+
sage: setprint(M.closure([0, 2, 4, 5])) # needs sage.graphs
770770
{0, 1, 2, 4, 5, 7}
771-
sage: M.is_valid() # optional - sage.graphs
771+
sage: M.is_valid() # needs sage.graphs
772772
True
773773
"""
774774
M = Matroid(groundset=list(range((n * (n - 1)) // 2)),
@@ -805,7 +805,7 @@ def Wheel(n, field=None, ring=None):
805805
sage: M.is_valid()
806806
True
807807
sage: M = matroids.Wheel(3)
808-
sage: M.is_isomorphic(matroids.CompleteGraphic(4)) # optional - sage.graphs
808+
sage: M.is_isomorphic(matroids.CompleteGraphic(4)) # needs sage.graphs
809809
True
810810
sage: M.is_isomorphic(matroids.Wheel(3, field=GF(3)))
811811
True
@@ -966,7 +966,7 @@ def PG(n, q, x=None):
966966
sage: M = matroids.PG(2, 2)
967967
sage: M.is_isomorphic(matroids.named_matroids.Fano())
968968
True
969-
sage: matroids.PG(5, 4, 'z').size() == (4^6 - 1) / (4 - 1) # optional - sage.rings.finite_rings
969+
sage: matroids.PG(5, 4, 'z').size() == (4^6 - 1) / (4 - 1) # needs sage.rings.finite_rings
970970
True
971971
sage: M = matroids.PG(4, 7); M
972972
PG(4, 7): Linear matroid of rank 5 on 2801 elements represented over
@@ -1009,7 +1009,7 @@ def AG(n, q, x=None):
10091009
sage: M = matroids.AG(2, 3) \ 8
10101010
sage: M.is_isomorphic(matroids.named_matroids.AG23minus())
10111011
True
1012-
sage: matroids.AG(5, 4, 'z').size() == ((4 ^ 6 - 1) / (4 - 1) - # optional - sage.rings.finite_rings
1012+
sage: matroids.AG(5, 4, 'z').size() == ((4 ^ 6 - 1) / (4 - 1) - # needs sage.rings.finite_rings
10131013
....: (4 ^ 5 - 1)/(4 - 1))
10141014
True
10151015
sage: M = matroids.AG(4, 2); M
@@ -1048,7 +1048,7 @@ def R10():
10481048
{4, 6}
10491049
sage: M.equals(M.dual())
10501050
False
1051-
sage: M.is_isomorphic(M.dual()) # optional - sage.graphs
1051+
sage: M.is_isomorphic(M.dual()) # needs sage.graphs
10521052
True
10531053
sage: M.is_valid()
10541054
True
@@ -1086,7 +1086,7 @@ def R12():
10861086
R12: Regular matroid of rank 6 on 12 elements with 441 bases
10871087
sage: M.equals(M.dual())
10881088
False
1089-
sage: M.is_isomorphic(M.dual()) # optional - sage.graphs
1089+
sage: M.is_isomorphic(M.dual()) # needs sage.graphs
10901090
True
10911091
sage: M.is_valid()
10921092
True
@@ -1246,10 +1246,10 @@ def Q10():
12461246
12471247
EXAMPLES::
12481248
1249-
sage: M = matroids.named_matroids.Q10() # optional - sage.rings.finite_rings
1250-
sage: M.is_isomorphic(M.dual()) # optional - sage.rings.finite_rings
1249+
sage: M = matroids.named_matroids.Q10() # needs sage.rings.finite_rings
1250+
sage: M.is_isomorphic(M.dual()) # needs sage.rings.finite_rings
12511251
True
1252-
sage: M.is_valid() # optional - sage.rings.finite_rings
1252+
sage: M.is_valid() # needs sage.rings.finite_rings
12531253
True
12541254
12551255
Check the splitter property. By Seymour's Theorem, and using self-duality,
@@ -1258,8 +1258,8 @@ def Q10():
12581258
are quaternary are `U_{2, 5}, U_{3, 5}, F_7, F_7^*`. As it happens, it
12591259
suffices to check for `U_{2, 5}`:
12601260
1261-
sage: S = matroids.named_matroids.Q10().linear_extensions(simple=True) # optional - sage.rings.finite_rings
1262-
sage: [M for M in S if not M.has_line_minor(5)] # long time # optional - sage.rings.finite_rings
1261+
sage: S = matroids.named_matroids.Q10().linear_extensions(simple=True) # needs sage.rings.finite_rings
1262+
sage: [M for M in S if not M.has_line_minor(5)] # long time, needs sage.rings.finite_rings
12631263
[]
12641264
"""
12651265
F = GF(4, 'x')
@@ -1369,8 +1369,8 @@ def Block_9_4():
13691369
sage: M = matroids.named_matroids.Block_9_4()
13701370
sage: M.is_valid() # long time
13711371
True
1372-
sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits())
1373-
sage: BD.is_t_design(return_parameters=True)
1372+
sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) # needs sage.graphs
1373+
sage: BD.is_t_design(return_parameters=True) # needs sage.graphs
13741374
(True, (2, 9, 4, 3))
13751375
"""
13761376
E = 'abcdefghi'
@@ -1395,8 +1395,8 @@ def Block_10_5():
13951395
sage: M = matroids.named_matroids.Block_10_5()
13961396
sage: M.is_valid() # long time
13971397
True
1398-
sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits())
1399-
sage: BD.is_t_design(return_parameters=True)
1398+
sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) # needs sage.graphs
1399+
sage: BD.is_t_design(return_parameters=True) # needs sage.graphs
14001400
(True, (3, 10, 5, 3))
14011401
"""
14021402

@@ -1427,7 +1427,7 @@ def ExtendedBinaryGolayCode():
14271427
14281428
sage: M = matroids.named_matroids.ExtendedBinaryGolayCode()
14291429
sage: C = LinearCode(M.representation())
1430-
sage: C.is_permutation_equivalent(codes.GolayCode(GF(2))) # long time # optional - sage.rings.finite_rings
1430+
sage: C.is_permutation_equivalent(codes.GolayCode(GF(2))) # long time, needs sage.rings.finite_rings
14311431
True
14321432
sage: M.is_valid()
14331433
True
@@ -1462,7 +1462,7 @@ def ExtendedTernaryGolayCode():
14621462
14631463
sage: M = matroids.named_matroids.ExtendedTernaryGolayCode()
14641464
sage: C = LinearCode(M.representation())
1465-
sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) # long time # optional - sage.rings.finite_rings
1465+
sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) # long time, needs sage.rings.finite_rings
14661466
True
14671467
sage: M.is_valid()
14681468
True

0 commit comments

Comments
 (0)