@@ -179,7 +179,7 @@ def Matroid(groundset=None, data=None, **kwds):
179
179
matroid.
180
180
- ``independent_sets`` -- The list of independent sets of the matroid.
181
181
- ``circuits`` -- The list of circuits of the matroid.
182
- - ``nonspanning_circuits`` -- The list of nonspanning_circuits of the
182
+ - ``nonspanning_circuits`` -- The list of nonspanning circuits of the
183
183
matroid.
184
184
- ``flats`` -- The dictionary of flats indexed by their rank.
185
185
- ``graph`` -- A graph, whose edges form the elements of the matroid.
@@ -226,6 +226,8 @@ def Matroid(groundset=None, data=None, **kwds):
226
226
227
227
The ``Matroid()`` method will return instances of type
228
228
:class:`BasisMatroid <sage.matroids.basis_matroid.BasisMatroid>`,
229
+ :class:`CircuitsMatroid <sage.matroids.circuits_matroid.CircuitsMatroid>`,
230
+ :class:`FlatsMatroid <sage.matroids.flats_matroid.FlatsMatroid>`,
229
231
:class:`CircuitClosuresMatroid <sage.matroids.circuit_closures_matroid.CircuitClosuresMatroid>`,
230
232
:class:`LinearMatroid <sage.matroids.linear_matroid.LinearMatroid>`,
231
233
:class:`BinaryMatroid <sage.matroids.linear_matroid.LinearMatroid>`,
@@ -307,7 +309,7 @@ def Matroid(groundset=None, data=None, **kwds):
307
309
sage: M1 = Matroid(groundset='abc', circuits=['bc'])
308
310
309
311
A matroid specified by a list of circuits gets converted to a
310
- :class:`CircuitsMatroid <sage.matroids.basis_matroid .CircuitsMatroid>`
312
+ :class:`CircuitsMatroid <sage.matroids.circuits_matroid .CircuitsMatroid>`
311
313
internally::
312
314
313
315
sage: from sage.matroids.circuits_matroid import CircuitsMatroid
@@ -331,6 +333,16 @@ def Matroid(groundset=None, data=None, **kwds):
331
333
sage: M.is_valid()
332
334
False
333
335
336
+ #. Dictionary of flats:
337
+
338
+ ::
339
+
340
+ sage: M = Matroid(flats={0: [''], 1: ['a', 'b'], 2: ['ab']})
341
+ sage: M.is_valid()
342
+ True
343
+ sage: type(M)
344
+ <class 'sage.matroids.flats_matroid.FlatsMatroid'>
345
+
334
346
#. Graph:
335
347
336
348
Sage has great support for graphs, see :mod:`sage.graphs.graph`.
0 commit comments