forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
12 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,8 @@ isomorphism testing. | |
AUTHORS: | ||
- Rudi Pendavingh, Stefan van Zwam (2013-04-01): initial version | ||
Methods | ||
======= | ||
""" | ||
|
||
# **************************************************************************** | ||
# Copyright (C) 2013 Rudi Pendavingh <[email protected]> | ||
# Copyright (C) 2013 Stefan van Zwam <[email protected]> | ||
|
@@ -40,7 +38,7 @@ cdef class SetSystem: | |
sage: M = matroids.catalog.Fano() | ||
sage: M.circuits() | ||
Iterator over a system of subsets | ||
SetSystem of 14 sets over 7 elements | ||
To access the sets in this structure, simply iterate over them. The | ||
simplest way must be:: | ||
|
@@ -75,7 +73,7 @@ cdef class SetSystem: | |
sage: from sage.matroids.set_system import SetSystem | ||
sage: S = SetSystem([1, 2, 3, 4], [[1, 2], [3, 4], [1, 2, 4]]) | ||
sage: S | ||
Iterator over a system of subsets | ||
SetSystem of 3 sets over 4 elements | ||
""" | ||
cdef long i | ||
if not isinstance(groundset, tuple): | ||
|
@@ -110,7 +108,7 @@ cdef class SetSystem: | |
sage: from sage.matroids.set_system import SetSystem | ||
sage: S = SetSystem([1, 2, 3, 4], [[1, 2], [3, 4], [1, 2, 4]]) | ||
sage: S | ||
Iterator over a system of subsets | ||
SetSystem of 3 sets over 4 elements | ||
sage: sorted(S[1]) | ||
[3, 4] | ||
sage: for s in S: print(sorted(s)) | ||
|
@@ -138,7 +136,7 @@ cdef class SetSystem: | |
sage: from sage.matroids.set_system import SetSystem | ||
sage: S = SetSystem([1, 2, 3, 4], [[1, 2], [3, 4], [1, 2, 4]]) | ||
sage: S | ||
Iterator over a system of subsets | ||
SetSystem of 3 sets over 4 elements | ||
sage: len(S) | ||
3 | ||
""" | ||
|
@@ -196,9 +194,9 @@ cdef class SetSystem: | |
sage: from sage.matroids.set_system import SetSystem | ||
sage: S = SetSystem([1, 2, 3, 4], [[1, 2], [3, 4], [1, 2, 4]]) | ||
sage: repr(S) # indirect doctest | ||
'Iterator over a system of subsets' | ||
'SetSystem of 3 sets over 4 elements' | ||
""" | ||
return "Iterator over a system of subsets" | ||
return f'SetSystem of {self._len} sets over {self._groundset_size} elements' | ||
|
||
cdef copy(self): | ||
cdef SetSystem S | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters