Crate permutator[−][src]
Generic permutator that can get a combination at any specific point.
Functions
divide_factorial |
Calculate factorial for two factorial division. It'll return 1 if numerator is smaller or equals to denominator. Otherwise, it'll short circuit the calculation by calculate only the undivided remainder. |
factorial |
Calculate factorial from given value. |
get_cartesian_for |
Get a cartesian product at specific location.
If |
get_cartesian_size |
Calculate all possible cartesian combination size. It is always equals to size.pow(degree). |
get_permutation_for |
Get permutation at specific location.
If |
get_permutation_size |
Calculate all possible number of permutation. It's equals to size!/(size - 1). |
multiply_factorial |
Calculate two factorial multiply on each other. It'll try to reduce calculation time by calculate the common value only once. |