From 08f69afe2833504c54115d61ab8e3f207a7b8fba Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Thu, 13 Nov 2014 11:26:05 +0000 Subject: [PATCH] Silly mistakes --- src/permanents.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/permanents.h diff --git a/src/permanents.h b/src/permanents.h new file mode 100644 index 0000000..153ce14 --- /dev/null +++ b/src/permanents.h @@ -0,0 +1,22 @@ +// Ryser's algorithm +static npy_complex128 perm_ryser(PyArrayObject *submatrix) { + int n = (int) PyArray_DIM(submatrix, 0); + npy_complex128 rowsum, rowsumprod; + npy_complex128 perm = complex_zero; + int exp = 1 << n; + int i, y, z; + for (i=0; i