Closed alexbeletsky closed 10 years ago
Sorry, I don't know exact English term for this, but that should be know as Permutation with Repetition, total number of permutations is n ^ r.
I have an alphabet, 'a, b, c, d, e' and need to generate all possible permutations, including ones
[a, a, a, a], [a, b, a, a] [a, b, c, a]
etc.
Can it be done with js-combinatorics?
js-combinatorics
It is more like a number represented as an array which digits are elements in the argument.
I added .baseN which is exactly what you are looking for in version 0.4.0.
Great addition, thank you!
Sorry, I don't know exact English term for this, but that should be know as Permutation with Repetition, total number of permutations is n ^ r.
I have an alphabet, 'a, b, c, d, e' and need to generate all possible permutations, including ones
etc.
Can it be done with
js-combinatorics
?