summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTara Fife <fi.tara@gmail.com>2016-06-07 17:01:44 -0500
committerTara Fife <fi.tara@gmail.com>2016-06-07 17:01:44 -0500
commit87533057d70e226d533fce0e853cc8a700c74a40 (patch)
tree53aae66d71b56f943b8260aedf612526d7200e7d
parentFixed spacing error (diff)
Fixed doctest
-rw-r--r--src/sage/matroids/matroid.pxd4
-rw-r--r--src/sage/matroids/matroid.pyx10
2 files changed, 8 insertions, 6 deletions
diff --git a/src/sage/matroids/matroid.pxd b/src/sage/matroids/matroid.pxd
index 1b3af89..99aaa4b 100644
--- a/src/sage/matroids/matroid.pxd
+++ b/src/sage/matroids/matroid.pxd
@@ -33,7 +33,7 @@ cdef class Matroid(SageObject):
cpdef _is_coclosed(self, X)
cpdef _minor(self, contractions, deletions)
- cpdef _has_minor(self, N, certificate=*)
+ cpdef _has_minor(self, N, bint certificate=*)
cpdef _line_length(self, F)
cpdef _extension(self, element, hyperplanes)
@@ -118,7 +118,7 @@ cdef class Matroid(SageObject):
cpdef _backslash_(self, X)
cpdef dual(self)
cpdef truncation(self)
- cpdef has_minor(self, N, certificate=*)
+ cpdef has_minor(self, N, bint certificate=*)
cpdef has_line_minor(self, k, hyperlines=*)
cpdef _has_line_minor(self, k, hyperlines)
diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx
index 5229beb..2eb1a39 100644
--- a/src/sage/matroids/matroid.pyx
+++ b/src/sage/matroids/matroid.pyx
@@ -1101,7 +1101,7 @@ cdef class Matroid(SageObject):
import minor_matroid
return minor_matroid.MinorMatroid(self, contractions, deletions)
- cpdef _has_minor(self, N, certificate=False):
+ cpdef _has_minor(self, N, bint certificate=False):
"""
Test if matroid has the specified minor,
and optionally return frozensets ``X`` and ``Y`` so that ``N`` is isomorphic to ``self.minor(X, Y)``.
@@ -1125,7 +1125,8 @@ cdef class Matroid(SageObject):
sage: M._has_minor(matroids.Uniform(2, 4))
True
sage: M._has_minor(matroids.Uniform(2, 4), certificate=True)
- (True, (frozenset({'a', 'c'}), frozenset({'b', 'e'})))
+ (True, (frozenset({'a', 'c'}), frozenset({'b', 'e'}),
+ {0: 'h', 1: 'd', 2: 'g', 3: 'f'}))
.. TODO::
@@ -3898,7 +3899,7 @@ cdef class Matroid(SageObject):
return self._extension(l, [])._minor(contractions=frozenset([l]),
deletions=frozenset([]))
- cpdef has_minor(self, N, certificate=False):
+ cpdef has_minor(self, N, bint certificate=False):
"""
Check if ``self`` has a minor isomorphic to ``N``,
and optionally return frozensets ``X`` and ``Y`` so that ``N`` is isomorphic to ``self.minor(X, Y)``.
@@ -3932,7 +3933,8 @@ cdef class Matroid(SageObject):
sage: matroids.named_matroids.NonFano().has_minor(M)
True
sage: matroids.named_matroids.NonFano().has_minor(M, certificate=True)
- (True, (frozenset(), frozenset({'g'})))
+ (True, (frozenset(), frozenset({'g'}),
+ {0: 'b', 1: 'c', 2: 'a', 3: 'd', 4: 'e', 5: 'f'}))
"""
if not isinstance(N, Matroid):
raise ValueError("N must be a matroid.")