Skip to content

Commit

Permalink
tweak constructor in hasse
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Nov 11, 2023
1 parent 000af45 commit 2e082a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sage/combinat/posets/hasse_cython.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IncreasingChains(RecursivelyEnumeratedSet_forest):
- ``positions`` -- a list of sets of integers describing the poset,
as given by the lazy attribute ``_leq_storage`` of Hasse diagrams.
- ``element_constructor`` -- used to determine the type of chains,
- ``constructor`` -- used to determine the type of chains,
for example :class:`list` or :class:`tuple`
- ``exclude`` -- list of integers that should not belong to the chains
Expand All @@ -50,7 +50,7 @@ class IncreasingChains(RecursivelyEnumeratedSet_forest):
sage: list(D)
[[], [0], [0, 1], [1]]
"""
def __init__(self, list positions, element_constructor,
def __init__(self, list positions, constructor,
list exclude, conversion=None):
"""
The enumerated set of increasing chains.
Expand All @@ -71,7 +71,7 @@ class IncreasingChains(RecursivelyEnumeratedSet_forest):
self._greater_than = positions
self._vertices = list(range(n))

self._constructor_ = element_constructor
self._constructor = constructor
self._conversion = conversion
if conversion is not None:
self._from_poset = {elt: i for i, elt in enumerate(conversion)}
Expand Down Expand Up @@ -133,7 +133,7 @@ class IncreasingChains(RecursivelyEnumeratedSet_forest):
If ``conversion`` was provided, it first converts elements of the
chain to elements of this list.
Then the given ``element_constructor`` is applied to the chain.
Then the given ``constructor`` is applied to the chain.
EXAMPLES::
Expand All @@ -148,8 +148,8 @@ class IncreasingChains(RecursivelyEnumeratedSet_forest):
"""
cdef Py_ssize_t i
if self._conversion is not None:
return self._constructor_(self._conversion[i] for i in chain)
return self._constructor_(chain)
return self._constructor(self._conversion[i] for i in chain)
return self._constructor(chain)

def children(self, chain):
"""
Expand Down

0 comments on commit 2e082a9

Please sign in to comment.