Skip to content

Commit

Permalink
Add CircuitsMatroid class
Browse files Browse the repository at this point in the history
  • Loading branch information
gmou3 committed Jan 24, 2024
1 parent 360a9d1 commit b17a2e3
Show file tree
Hide file tree
Showing 6 changed files with 747 additions and 31 deletions.
1 change: 1 addition & 0 deletions src/doc/en/reference/matroids/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Concrete implementations
:maxdepth: 1

sage/matroids/basis_matroid
sage/matroids/circuits_matroid
sage/matroids/circuit_closures_matroid
sage/matroids/linear_matroid
sage/matroids/rank_matroid
Expand Down
30 changes: 30 additions & 0 deletions src/sage/matroids/circuits_matroid.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem

cdef class CircuitsMatroid(Matroid):
cdef frozenset _groundset # _E
cdef int _matroid_rank # _R
cdef SetSystem _C # circuits
cdef dict _k_C # k-circuits (k=len)
cdef bint _nsc_defined
cpdef groundset(self) noexcept
cpdef _rank(self, X) noexcept
cpdef full_rank(self) noexcept
cpdef _is_independent(self, F) noexcept
cpdef _max_independent(self, F) noexcept
cpdef _circuit(self, F) noexcept

# enumeration
cpdef bases(self) noexcept
cpdef circuits(self, k=*) noexcept
cpdef nonspanning_circuits(self) noexcept

# properties
cpdef girth(self) noexcept
cpdef is_paving(self) noexcept

# isomorphism
cpdef _is_isomorphic(self, other, certificate=*) noexcept

# verification
cpdef is_valid(self) noexcept
Loading

0 comments on commit b17a2e3

Please sign in to comment.