LL=XPpermute([sc,lists])
sc : | separator; default is '' | |
lists : | cell lists of arguments |
LL : | cell list of all combinations of the permutation |
XPpermute(' ',{'ISBIGGER'},{'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}, {'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}); XX=ans
This function, XPpermute
, is designed to create permutations of sets. It is part of the SolidGeometry library and was introduced in version 5.4. The function is authored by Tim Lueth and is classified under Artificial Intelligence.
sc
using the helper function getfuncparams
. This function extracts the first parameter from varargin
, which is a variable-length input argument list.permutevarargin
with the remaining elements of varargin
(i.e., the lists of arguments) to generate permutations.permutevarargin
are then joined using the specified separator sc
by calling the join
function.LL
, is a cell list of all possible combinations of the permutations.An example call to the function is:
XPpermute(' ', {'ISBIGGER'}, {'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}, {'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'});
This call will generate permutations of the lists with a space as the separator.
Algorithm explaination created using ChatGPT on 2025-08-18 23:39. (Please note: No guarantee for the correctness of this explanation)