Skip to content

Commit 5ef344d

Browse files
author
Matthias Koeppe
committed
./sage -fixdoctests --only-tags src/sage/matroids/*.{py,pyx}
1 parent 2d595a8 commit 5ef344d

File tree

8 files changed

+186
-175
lines changed

8 files changed

+186
-175
lines changed

src/sage/matroids/basis_exchange_matroid.pyx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ cdef class BasisExchangeMatroid(Matroid):
17151715
EXAMPLES::
17161716
17171717
sage: M = matroids.named_matroids.N1()
1718-
sage: binomial(M.size(), M.full_rank())-M.bases_count() # optional - sage.symbolic
1718+
sage: binomial(M.size(), M.full_rank())-M.bases_count() # needs sage.symbolic
17191719
68
17201720
sage: len([B for B in M.nonbases()])
17211721
68
@@ -2195,9 +2195,9 @@ cdef class BasisExchangeMatroid(Matroid):
21952195
21962196
sage: from sage.matroids.advanced import *
21972197
sage: M1 = matroids.Wheel(3)
2198-
sage: M2 = matroids.CompleteGraphic(4) # optional - sage.graphs
2199-
sage: morphism = M1._isomorphism(M2) # optional - sage.graphs
2200-
sage: M1._is_isomorphism(M2, morphism) # optional - sage.graphs
2198+
sage: M2 = matroids.CompleteGraphic(4) # needs sage.graphs
2199+
sage: morphism = M1._isomorphism(M2) # needs sage.graphs
2200+
sage: M1._is_isomorphism(M2, morphism) # needs sage.graphs
22012201
True
22022202
sage: M1 = matroids.named_matroids.Fano()
22032203
sage: M2 = matroids.named_matroids.NonFano()
@@ -2289,10 +2289,10 @@ cdef class BasisExchangeMatroid(Matroid):
22892289
22902290
sage: from sage.matroids.advanced import *
22912291
sage: M1 = BasisMatroid(matroids.Wheel(3))
2292-
sage: M2 = matroids.CompleteGraphic(4) # optional - sage.graphs
2293-
sage: M1._is_isomorphic(M2) # optional - sage.graphs
2292+
sage: M2 = matroids.CompleteGraphic(4) # needs sage.graphs
2293+
sage: M1._is_isomorphic(M2) # needs sage.graphs
22942294
True
2295-
sage: M1._is_isomorphic(M2, certificate=True) # optional - sage.graphs
2295+
sage: M1._is_isomorphic(M2, certificate=True) # needs sage.graphs
22962296
(True, {0: 0, 1: 1, 2: 2, 3: 3, 4: 5, 5: 4})
22972297
sage: M1 = BasisMatroid(matroids.named_matroids.Fano())
22982298
sage: M2 = matroids.named_matroids.NonFano()

src/sage/matroids/basis_matroid.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,9 @@ cdef class BasisMatroid(BasisExchangeMatroid):
975975
976976
sage: from sage.matroids.advanced import *
977977
sage: M = BasisMatroid(matroids.Wheel(3))
978-
sage: N = BasisMatroid(matroids.CompleteGraphic(4)) # optional - sage.graphs
979-
sage: morphism = M._isomorphism(N) # optional - sage.graphs
980-
sage: M._is_isomorphism(N, morphism) # optional - sage.graphs
978+
sage: N = BasisMatroid(matroids.CompleteGraphic(4)) # needs sage.graphs
979+
sage: morphism = M._isomorphism(N) # needs sage.graphs
980+
sage: M._is_isomorphism(N, morphism) # needs sage.graphs
981981
True
982982
sage: M = BasisMatroid(matroids.named_matroids.NonFano())
983983
sage: N = BasisMatroid(matroids.named_matroids.Fano())

src/sage/matroids/circuit_closures_matroid.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,10 @@ cdef class CircuitClosuresMatroid(Matroid):
387387
388388
sage: from sage.matroids.advanced import *
389389
sage: M1 = CircuitClosuresMatroid(matroids.Wheel(3))
390-
sage: M2 = matroids.CompleteGraphic(4) # optional - sage.graphs
391-
sage: M1._is_isomorphic(M2) # optional - sage.graphs
390+
sage: M2 = matroids.CompleteGraphic(4) # needs sage.graphs
391+
sage: M1._is_isomorphic(M2) # needs sage.graphs
392392
True
393-
sage: M1._is_isomorphic(M2, certificate=True) # optional - sage.graphs
393+
sage: M1._is_isomorphic(M2, certificate=True) # needs sage.graphs
394394
(True, {0: 0, 1: 1, 2: 2, 3: 3, 4: 5, 5: 4})
395395
sage: M1 = CircuitClosuresMatroid(matroids.named_matroids.Fano())
396396
sage: M2 = matroids.named_matroids.NonFano()

src/sage/matroids/constructor.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -351,28 +351,30 @@ def Matroid(groundset=None, data=None, **kwds):
351351
If there are no edges in parallel, and is not a complete list of labels,
352352
or the labels are not unique, then vertex tuples are used::
353353
354-
sage: G = Graph([(0, 1, 'a'), (0, 2, 'b'), (1, 2, 'b')]) # needs sage.graphs
355-
sage: M = Matroid(G) # needs sage.graphs
356-
sage: sorted(M.groundset()) # needs sage.graphs
354+
sage: # needs sage.graphs
355+
sage: G = Graph([(0, 1, 'a'), (0, 2, 'b'), (1, 2, 'b')])
356+
sage: M = Matroid(G)
357+
sage: sorted(M.groundset())
357358
[(0, 1), (0, 2), (1, 2)]
358-
sage: H = Graph([(0, 1, 'a'), (0, 2, 'b'), (1, 2, 'b'), (1, 2, 'c')], # needs sage.graphs
359+
sage: H = Graph([(0, 1, 'a'), (0, 2, 'b'), (1, 2, 'b'), (1, 2, 'c')],
359360
....: multiedges=True)
360-
sage: N = Matroid(H) # needs sage.graphs
361-
sage: sorted(N.groundset()) # needs sage.graphs
361+
sage: N = Matroid(H)
362+
sage: sorted(N.groundset())
362363
[0, 1, 2, 3]
363364
364365
The GraphicMatroid object forces its graph to be connected. If a
365366
disconnected graph is used as input, it will connect the components::
366367
367-
sage: G1 = graphs.CycleGraph(3); G2 = graphs.DiamondGraph() # needs sage.graphs
368-
sage: G = G1.disjoint_union(G2) # needs sage.graphs
369-
sage: M = Matroid(G); M # needs sage.graphs
368+
sage: # needs sage.graphs
369+
sage: G1 = graphs.CycleGraph(3); G2 = graphs.DiamondGraph()
370+
sage: G = G1.disjoint_union(G2)
371+
sage: M = Matroid(G); M
370372
Graphic matroid of rank 5 on 8 elements
371-
sage: M.graph() # needs sage.graphs
373+
sage: M.graph()
372374
Looped multi-graph on 6 vertices
373-
sage: M.graph().is_connected() # needs sage.graphs
375+
sage: M.graph().is_connected()
374376
True
375-
sage: M.is_connected() # needs sage.graphs
377+
sage: M.is_connected()
376378
False
377379
378380

0 commit comments

Comments
 (0)