Skip to content

Commit 9cb3208

Browse files
committed
Suggestions by mkoeppe
1 parent 421d14e commit 9cb3208

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/sage/matroids/constructor.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def Matroid(groundset=None, data=None, **kwds):
179179
matroid.
180180
- ``independent_sets`` -- The list of independent sets of the matroid.
181181
- ``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
183183
matroid.
184184
- ``flats`` -- The dictionary of flats indexed by their rank.
185185
- ``graph`` -- A graph, whose edges form the elements of the matroid.
@@ -226,6 +226,8 @@ def Matroid(groundset=None, data=None, **kwds):
226226
227227
The ``Matroid()`` method will return instances of type
228228
:class:`BasisMatroid <sage.matroids.basis_matroid.BasisMatroid>`,
229+
:class:`CircuitsMatroid <sage.matroids.circuits_matroid.CircuitsMatroid>`,
230+
:class:`FlatsMatroid <sage.matroids.flats_matroid.FlatsMatroid>`,
229231
:class:`CircuitClosuresMatroid <sage.matroids.circuit_closures_matroid.CircuitClosuresMatroid>`,
230232
:class:`LinearMatroid <sage.matroids.linear_matroid.LinearMatroid>`,
231233
:class:`BinaryMatroid <sage.matroids.linear_matroid.LinearMatroid>`,
@@ -307,7 +309,7 @@ def Matroid(groundset=None, data=None, **kwds):
307309
sage: M1 = Matroid(groundset='abc', circuits=['bc'])
308310
309311
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>`
311313
internally::
312314
313315
sage: from sage.matroids.circuits_matroid import CircuitsMatroid
@@ -331,6 +333,16 @@ def Matroid(groundset=None, data=None, **kwds):
331333
sage: M.is_valid()
332334
False
333335
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+
334346
#. Graph:
335347
336348
Sage has great support for graphs, see :mod:`sage.graphs.graph`.

src/sage/matroids/flats_matroid.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ cdef class FlatsMatroid(Matroid):
111111
112112
INPUT:
113113
114-
- ``X`` -- an object with Python's ``frozenset`` interface
114+
- ``X`` -- an object with Python's :class:`frozenset` interface
115115
116116
OUTPUT: an integer; the rank of ``X`` in the matroid
117117
@@ -357,7 +357,7 @@ cdef class FlatsMatroid(Matroid):
357357
358358
- ``k`` -- an integer
359359
360-
OUTPUT: a SetSystem
360+
OUTPUT: a :class:`SetSystem`
361361
362362
EXAMPLES::
363363

src/sage/matroids/unpickling.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def unpickle_circuit_closures_matroid(version, data):
181181

182182
def unpickle_flats_matroid(version, data):
183183
"""
184-
Unpickle a FlatsMatroid.
184+
Unpickle a :class:`FlatsMatroid`.
185185
186186
*Pickling* is Python's term for the loading and saving of objects.
187187
Functions like these serve to reconstruct a saved object. This all happens

0 commit comments

Comments
 (0)