super_permutations.py

Class that calculates indices providing superpermutations for lists of strings with length of maximum 5 elements

class super_permutations.SuperPerms(max_v)

Bases: object

Class that defines superpermutation indices

__init__(max_v)

Method that creates objects from a class “SuperPerms”

Parameters:

max_v (int) – Number of words in superpermutation

Returns:

The method does not return any values

__weakref__

list of weak references to the object (if defined)

get_super_perm(p_vals=None, c_perms=None)

Recursive function that finds final superpermutation (shortests list of indices)

Parameters:
  • p_vals (Optional[str]) – Previous permutation values

  • c_perms (Optional[List[str]]) – List of current permutation

Return type:

List[int]

Returns:

Final list of indices