From e1ebff51092baf5581b728baec05c52c4bb3445e Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 12 Jul 2020 20:44:09 +0200 Subject: Added feature: scramble --- src/utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index b24ccb2..45a6302 100644 --- a/src/utils.h +++ b/src/utils.h @@ -36,6 +36,10 @@ int perm_to_index(int *a, int n); * (see perm_to_index) and saves the result to r. */ void index_to_perm(int p, int n, int *r); +/* Determine the sign of a permutation, either in integer or array format. */ +int perm_sign_array(int a[], int n); +int perm_sign_int(int p, int n); + /* Converts a k-element subset of a set with an element from an array of n * elements, of which k are 1 and n-k are 0, to its index in the sorted list * of all such subsets. -- cgit v1.3