@@ -1115,9 +1115,9 @@ cdef class Matroid(SageObject):
1115
1115
if certificate:
1116
1116
return False , None
1117
1117
return False
1118
- D = self .dual()
1118
+ YY = self .dual().independent_r_sets(cd )
1119
1119
for X in self .independent_r_sets_iterator(rd):
1120
- for Y in D.independent_r_sets_iterator(cd) :
1120
+ for Y in YY :
1121
1121
if X.isdisjoint(Y):
1122
1122
if N._is_isomorphic(self ._minor(contractions = X, deletions = Y)):
1123
1123
if certificate:
@@ -2317,17 +2317,20 @@ cdef class Matroid(SageObject):
2317
2317
['b', 'd', 'f', 'g'], ['b', 'e', 'g'], ['c', 'd', 'e', 'g'],
2318
2318
['c', 'f', 'g'], ['d', 'e', 'f']]
2319
2319
"""
2320
- if k and k < self .rank() + 2 :
2321
- for X in combinations(self .groundset(), k):
2320
+ rk = self .rank()
2321
+ if k is None :
2322
+ start = 0
2323
+ stop = rk + 2
2324
+ else :
2325
+ if k >= rk + 2 :
2326
+ return
2327
+ start = k
2328
+ stop = k + 1
2329
+ for j in range (start, stop):
2330
+ for X in combinations(self .groundset(), j):
2322
2331
X = frozenset (X)
2323
2332
if self ._is_circuit(X):
2324
2333
yield X
2325
- elif not k:
2326
- for k in range (self .rank() + 2 ):
2327
- for X in combinations(self .groundset(), k):
2328
- X = frozenset (X)
2329
- if self ._is_circuit(X):
2330
- yield X
2331
2334
2332
2335
cpdef nonspanning_circuits(self ) noexcept:
2333
2336
"""
@@ -2769,7 +2772,7 @@ cdef class Matroid(SageObject):
2769
2772
:meth:`M. independent_sets( ) <sage. matroids. matroid. Matroid. independent_sets>`
2770
2773
:meth:`M. bases( ) <sage. matroids. matroid. Matroid. bases>`
2771
2774
"""
2772
- res = []
2775
+ cdef list res = []
2773
2776
for X in combinations(self .groundset(), r):
2774
2777
X = frozenset (X)
2775
2778
if self ._rank(X) == len (X):
@@ -2966,7 +2969,7 @@ cdef class Matroid(SageObject):
2966
2969
r """
2967
2970
Return the `f`-vector of the matroid.
2968
2971
2969
- The `f`-* vector* is a vector `( f_0, \d ots , f_r) `, where `f_i` is the
2972
+ The `f`-* vector* is a vector `( f_0, \l dots , f_r) `, where `f_i` is the
2970
2973
number of independent sets of rank `i`, and `r` is the rank of the
2971
2974
matroid.
2972
2975
@@ -2997,8 +3000,8 @@ cdef class Matroid(SageObject):
2997
3000
Return the Whitney numbers of the first kind of the matroid.
2998
3001
2999
3002
The Whitney numbers of the first kind -- here encoded as a vector
3000
- `( w_0=1, ... , w_r) ` -- are numbers of alternating sign, where `w_i` is
3001
- the value of the coefficient of the `( r-i) `-th degree term of the
3003
+ `( w_0=1, \l dots , w_r) ` -- are numbers of alternating sign, where `w_i`
3004
+ is the value of the coefficient of the `( r-i) `-th degree term of the
3002
3005
matroid's characteristic polynomial. Moreover, `| w_i| ` is the number of
3003
3006
`( i-1) `-dimensional faces of the broken circuit complex of the matroid.
3004
3007
@@ -3026,8 +3029,8 @@ cdef class Matroid(SageObject):
3026
3029
Return the Whitney numbers of the second kind of the matroid.
3027
3030
3028
3031
The Whitney numbers of the second kind are here encoded as a vector
3029
- `( W_0, ... , W_r) `, where `W_i` is the number of flats of rank `i`, and
3030
- `r` is the rank of the matroid.
3032
+ `( W_0, \l dots , W_r) `, where `W_i` is the number of flats of rank `i`,
3033
+ and `r` is the rank of the matroid.
3031
3034
3032
3035
OUTPUT: a list of integers
3033
3036
@@ -3204,7 +3207,6 @@ cdef class Matroid(SageObject):
3204
3207
and facets {( 1, 3, 5) , ( 2, 3, 5) , ( 2, 4, 5) , ( 3, 4, 5) }
3205
3208
"""
3206
3209
if not self .loops():
3207
-
3208
3210
if ordering is None :
3209
3211
rev_order = sorted (self .groundset(), key = cmp_elements_key, reverse = True )
3210
3212
else :
@@ -3311,7 +3313,7 @@ cdef class Matroid(SageObject):
3311
3313
3312
3314
over all bases `B` of the matroid. Here `e_i` are the standard
3313
3315
basis vectors of `\R R^ n`. An arbitrary labelling of the
3314
- groundset by `{0,\d ots ,n-1}` is chosen.
3316
+ groundset by `{0,\l dots ,n-1}` is chosen.
3315
3317
3316
3318
.. SEEALSO::
3317
3319
@@ -3358,7 +3360,7 @@ cdef class Matroid(SageObject):
3358
3360
3359
3361
over all independent sets `I` of the matroid. Here `e_i` are
3360
3362
the standard basis vectors of `\R R^ n`. An arbitrary labelling
3361
- of the groundset by `{0,\d ots ,n-1}` is chosen.
3363
+ of the groundset by `{0,\l dots ,n-1}` is chosen.
3362
3364
3363
3365
.. SEEALSO::
3364
3366
0 commit comments