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

Commit

Permalink
remove excess code from copy & paste
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoxu committed May 28, 2015
1 parent c4f38eb commit 5167f3d
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/sage/matroids/matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4849,37 +4849,6 @@ cdef class Matroid(SageObject):
if not M.is_3connected_beta(M).simplify():
return False
return True
# matroid k-closed

cpdef is_k_closed(self, k):
r"""
Return if ``self`` is a ``k``-closed matroid.
We say a matroid is `k`-closed if all `k`-closed subsets
are closed in ``M``.
EXAMPLES::
sage: PR = RootSystem(['A',4]).root_lattice().positive_roots()
sage: m = matrix(map(lambda x: x.to_vector(), PR)).transpose()
sage: M = Matroid(m)
sage: M.is_k_closed(3)
True
sage: M.is_k_closed(4)
True
sage: PR = RootSystem(['D',4]).root_lattice().positive_roots()
sage: m = matrix(map(lambda x: x.to_vector(), PR)).transpose()
sage: M = Matroid(m)
sage: M.is_k_closed(3)
False
sage: M.is_k_closed(4)
True
"""
for S in subsets(self.groundset()):
if self.is_subset_k_closed(S, k) and not self.is_closed(S):
return False
return True

# matroid k-closed

Expand Down

0 comments on commit 5167f3d

Please sign in to comment.