interfaces¶
Submodules¶
permuta.interfaces.Displayable module¶
permuta.interfaces.Flippable module¶
permuta.interfaces.Patt module¶
-
class
permuta.interfaces.Patt.
Patt
¶ Bases:
abc.ABC
-
avoided_by
(*perms)¶ Check if self is avoided by perms.
Parameters: - self – A classical/mesh pattern.
- perms – [permuta.Permutation] A list of permutations.
- Returns: bool
- True if and only if every permutation in perms avoids self.
-
contained_in
(*perms)¶ Check if self is a pattern of perms.
Parameters: - self – A classical/mesh pattern.
- perms – [permuta.Permutation] A list of permutations.
- Returns: bool
- True if and only if self is a pattern of all permutations in perms.
-
count_occurrences_in
(perm)¶ Count the number of occurrences of self in perm.
Parameters: - self – A classical/mesh pattern.
- perm – permuta.Permutation A permutation.
- Returns: int
- The number of times self occurs in perm.
-
occurrences_in
(perm)¶ Find all indices of occurrences of self in perm.
-
permuta.interfaces.Rotatable module¶
permuta.interfaces.Shiftable module¶
-
class
permuta.interfaces.Shiftable.
Shiftable
¶ Bases:
abc.ABC
-
shift_down
(times=1)¶ Return self shifted times steps down.
If times is negative, shifted up.
-
shift_left
(times=1)¶ Return self shifted times steps to the left.
If times is negative, shifted to the right.
-
shift_right
(times=1)¶ Return self shifted times steps to the right.
If shift is negative, shifted to the left.
-
shift_up
(times=1)¶ Return self shifted times steps up.
If times is negative, shifted down.
-