Go to the source code of this file.
Functions | |
mdp_int | mdp_permutations (int n) |
void | mdp_permutation_sort (int map[], int k) |
int | mdp_permutation (int n, int k, int i) |
Functions to compute permutations
Licensed under GPL2 license Read attached license in file mdp_license.pdf This file cannot be distributed without file mdp_license.pdf
int mdp_permutation | ( | int | n, | |
int | k, | |||
int | i | |||
) |
Returns j-th element of the k-th permutations of n numbers For example if n=4 [0123] k=0 [0132] k=1 ... [3210] k=23 Returns -1 on error when (i>n || k>n_permutations(n))
void mdp_permutation_sort | ( | int | map[], | |
int | k | |||
) |
mdp_int mdp_permutations | ( | int | n | ) |