protocol
permutations_protocolï
Protocol for permutations operations over lists.
logtalk_load(permutations(loader))staticPublic predicatesï
permutations/2ï
Generates all permutations of a list.
staticpermutations(List,Permutations)permutations(+list,-list) - onepermutation/2ï
True iff the second argument is a permutation of the first argument.
staticpermutation(List,Permutation)permutation(+list,-list) - one_or_morepermutations/3ï
Generates all permutations with the given order: default, lexicographic, or shortlex.
staticpermutations(List,Order,Permutations)permutations(+list,+atom,-list) - onepermutation/3ï
True iff the third argument is a permutation with the given order: default, lexicographic, or shortlex.
staticpermutation(List,Order,Permutation)permutation(+list,+atom,-list) - one_or_moredistinct_permutations/2ï
Generates all distinct permutations of a list (deduplicating repeated values in the input list).
staticdistinct_permutations(List,Permutations)distinct_permutations(+list,-list) - onedistinct_permutation/2ï
True iff the second argument is a distinct permutation of the first argument.
staticdistinct_permutation(List,Permutation)distinct_permutation(+list,-list) - one_or_moredistinct_permutations/3ï
Generates all distinct permutations with the given order: default, lexicographic, or shortlex.
staticdistinct_permutations(List,Order,Permutations)distinct_permutations(+list,+atom,-list) - onedistinct_permutation/3ï
True iff the third argument is a distinct permutation with the given order: default, lexicographic, or shortlex.
staticdistinct_permutation(List,Order,Permutation)distinct_permutation(+list,+atom,-list) - one_or_morek_permutations/3ï
Generates all K-permutations (ordered selections) of a list.
statick_permutations(K,List,Permutations)k_permutations(+integer,+list,-list) - onek_permutation/3ï
True iff the third argument is a K-permutation (ordered selection) of a list.
statick_permutation(K,List,Permutation)k_permutation(+integer,+list,-list) - one_or_morek_permutations/4ï
Generates all K-permutations with the given order: default, lexicographic, or shortlex.
statick_permutations(K,List,Order,Permutations)k_permutations(+integer,+list,+atom,-list) - onek_permutation/4ï
True iff the fourth argument is a K-permutation with the given order: default, lexicographic, or shortlex.
statick_permutation(K,List,Order,Permutation)k_permutation(+integer,+list,+atom,-list) - one_or_morecartesian_product/3ï
Generates all K-element tuples from a list with replacement where order matters.
staticcartesian_product(K,List,Tuples)cartesian_product(+integer,+list,-list) - onederangements/2ï
Generates all derangements of a list.
staticderangements(List,Derangements)derangements(+list,-list) - onederangement/2ï
True iff the second argument is a derangement of the first argument.
staticderangement(List,Derangement)derangement(+list,-list) - one_or_morenext_permutation/2ï
Returns the next permutation in lexicographic order.
staticnext_permutation(Permutation,Next)next_permutation(+list,-list) - zero_or_oneprevious_permutation/2ï
Returns the previous permutation in lexicographic order.
staticprevious_permutation(Permutation,Previous)previous_permutation(+list,-list) - zero_or_onenth_permutation/3ï
Returns the permutation at a given zero-based index.
staticnth_permutation(List,Index,Permutation)nth_permutation(+list,+integer,-list) - zero_or_onepermutation_index/3ï
Returns the zero-based index of a permutation.
staticpermutation_index(List,Permutation,Index)permutation_index(+list,+list,-integer) - zero_or_onecount_permutations/2ï
Counts the number of permutations of a list.
staticcount_permutations(List,Count)count_permutations(+list,-integer) - onerandom_permutation/2ï
Returns a random permutation of a list.
staticrandom_permutation(List,Permutation)random_permutation(+list,-list) - oneProtected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)