Words in short-lex order (wislo)¶
The function wislo
can be used to iterate through words in short-lex
order in some range.
- wislo(n: int, first: List[int], last: List[int]) Iterator ¶
Returns an iterator to strings in short-lex order (sislo).
- Parameters
- Returns
An iterator to words over an alphabet with
n
in short-lex order and in the range[first, last)
.
>>> from libsemigroups_pybind11 import wislo >>> list(wislo(2, [0], [1, 1])) [[0], [1], [0, 0], [0, 1], [1, 0]]