Skip to content

Commit

Permalink
gh-36096: add ordered set partitions as supported findstat collection
Browse files Browse the repository at this point in the history
    
findstat.org supports a new collection, ordered set partitions.  This
has to be reflected by the sage interface.

Fixes #35968

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
    
URL: #36096
Reported by: Martin Rubey
Reviewer(s): Frédéric Chapoton
  • Loading branch information
Release Manager committed Aug 26, 2023
2 parents 727a619 + 0b63566 commit 53e8cbb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sage/databases/findstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def mapping(sigma):
from sage.combinat.colored_permutations import SignedPermutation, SignedPermutations
from sage.combinat.plane_partition import PlanePartition
from sage.combinat.decorated_permutation import DecoratedPermutation, DecoratedPermutations
from sage.combinat.set_partition_ordered import OrderedSetPartition, OrderedSetPartitions

######################################################################
# the FindStat URLs
Expand Down Expand Up @@ -4673,7 +4674,13 @@ def name(self, style="singular"):
for i, v in enumerate(x, 1))) + "]",
DecoratedPermutations,
lambda x: x.size(),
lambda x: isinstance(x, DecoratedPermutation))}
lambda x: isinstance(x, DecoratedPermutation)),
"OrderedSetPartitions":
_SupportedFindStatCollection(lambda x: OrderedSetPartition(literal_eval(x.replace('{','[').replace('}',']'))),
str,
OrderedSetPartitions,
lambda x: x.size(),
lambda x: isinstance(x, OrderedSetPartition))}


class FindStatCollections(UniqueRepresentation, Parent):
Expand Down

0 comments on commit 53e8cbb

Please sign in to comment.