FLINT3.7.0-dev

_perm_parity

Synopsis#include <flint/perm.h>
int _perm_parity(const slong * vec, slong n)source

Returns the parity of the permutation: 0 if it is even and 1 if it is odd. It counts the cycles c and returns (n - c) \bmod 2, using a temporary array of n flags.

Cite this page

The FLINT team, “_perm_parity (perm.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/perm/_perm_parity.html (generated 2026-10-20).