#if !defined HAVE_PERMQ_H__
#define      HAVE_PERMQ_H__


//#include "ds/bitarray.h"
class bitarray;

#include "fxttypes.h"


// perm/permq.cc:
bool is_identity(const ulong *f, ulong n);
bool has_fixed_points(const ulong *f, ulong n);
ulong count_fixed_points(const ulong *f, ulong n);
ulong count_descents(const ulong *f, ulong n);
ulong count_excedances(const ulong *f, ulong n, bool eq=true);
bool is_derangement(const ulong *f, ulong n);
bool is_derangement(const ulong *f, const ulong *g, ulong n);
bool is_connected(const ulong *f, ulong n);
bool is_updown_permutation(const ulong *f, ulong n);
bool is_cyclic(const ulong *f, ulong n);
bool is_valid_permutation(const ulong *f, ulong n, bitarray *bp=0);
bool is_involution(const ulong *f, ulong n, bool hint=false);
bool is_inverse(const ulong *f, const ulong *g, ulong n, bool hint=false);
bool is_square(const ulong *f, const ulong *g, ulong n);
//ulong perm_index(const ulong *f, ulong n);
ulong get_num_transpositions(const ulong *f, ulong n, bitarray *bp=0);
ulong get_periods(const ulong *f, ulong n, ulong *p, bitarray *bp=0);



//: functions for the application of permutations to data
//: are found in perm/permapply.h

//: functions for random permutations
//: are found in perm/permrand.h

#endif  // !defined HAVE_PERMQ_H__
