Skip to content

Commit 145d16a

Browse files
committed
-
1 parent 9c77937 commit 145d16a

File tree

1 file changed

+8
-1
lines changed
  • source_py3/python_toolbox/combi/perming

1 file changed

+8
-1
lines changed

source_py3/python_toolbox/combi/perming/perm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,14 @@ def n_cycles(self):
385385

386386
def get_neighbors(self, *, degrees=(1,), perm_space=None):
387387
'''
388-
388+
Get the neighbor permutations of this permutation.
389+
390+
This means, get the permutations that are close to this permutation. By
391+
default, this means permutations that are one transformation (switching
392+
a pair of items) away from this permutation. You can specify a custom
393+
sequence of integers to the `degrees` argument to get different degrees
394+
of relation. (e.g. specify `degrees=(1, 2)` to get both the closest
395+
neighbors and the second-closest neighbors.)
389396
'''
390397
from ..map_space import MapSpace
391398
if self.is_combination or self.is_recurrent or self.is_partial:

0 commit comments

Comments
 (0)