gdsl  1.6
gdsl_perm.h File Reference

Go to the source code of this file.

Typedefs

typedef struct gdsl_perm * gdsl_perm_t
 GDSL permutation type.
typedef void(* gdsl_perm_write_func_t )(ulong E, FILE *OUTPUT_FILE, gdsl_location_t POSITION, void *USER_DATA)
 GDSL permutation write function type.
typedef struct gdsl_perm_data * gdsl_perm_data_t

Enumerations

enum  gdsl_perm_position_t { GDSL_PERM_POSITION_FIRST = 1, GDSL_PERM_POSITION_LAST = 2 }
 This type is for gdsl_perm_write_func_t. More...

Functions

gdsl_perm_t gdsl_perm_alloc (const char *NAME, const ulong N)
 Create a new permutation.
void gdsl_perm_free (gdsl_perm_t P)
 Destroy a permutation.
gdsl_perm_t gdsl_perm_copy (const gdsl_perm_t P)
 Copy a permutation.
const char * gdsl_perm_get_name (const gdsl_perm_t P)
 Get the name of a permutation.
ulong gdsl_perm_get_size (const gdsl_perm_t P)
 Get the size of a permutation.
ulong gdsl_perm_get_element (const gdsl_perm_t P, const ulong INDIX)
 Get the (INDIX+1)-th element from a permutation.
ulonggdsl_perm_get_elements_array (const gdsl_perm_t P)
 Get the array elements of a permutation.
ulong gdsl_perm_linear_inversions_count (const gdsl_perm_t P)
 Count the inversions number into a linear permutation.
ulong gdsl_perm_linear_cycles_count (const gdsl_perm_t P)
 Count the cycles number into a linear permutation.
ulong gdsl_perm_canonical_cycles_count (const gdsl_perm_t P)
 Count the cycles number into a canonical permutation.
gdsl_perm_t gdsl_perm_set_name (gdsl_perm_t P, const char *NEW_NAME)
 Set the name of a permutation.
gdsl_perm_t gdsl_perm_linear_next (gdsl_perm_t P)
 Get the next permutation from a linear permutation.
gdsl_perm_t gdsl_perm_linear_prev (gdsl_perm_t P)
 Get the previous permutation from a linear permutation.
gdsl_perm_t gdsl_perm_set_elements_array (gdsl_perm_t P, const ulong *ARRAY)
 Initialize a permutation with an array of values.
gdsl_perm_t gdsl_perm_multiply (gdsl_perm_t RESULT, const gdsl_perm_t ALPHA, const gdsl_perm_t BETA)
 Multiply two permutations.
gdsl_perm_t gdsl_perm_linear_to_canonical (gdsl_perm_t Q, const gdsl_perm_t P)
 Convert a linear permutation to its canonical form.
gdsl_perm_t gdsl_perm_canonical_to_linear (gdsl_perm_t Q, const gdsl_perm_t P)
 Convert a canonical permutation to its linear form.
gdsl_perm_t gdsl_perm_inverse (gdsl_perm_t P)
 Inverse in place a permutation.
gdsl_perm_t gdsl_perm_reverse (gdsl_perm_t P)
 Reverse in place a permutation.
gdsl_perm_t gdsl_perm_randomize (gdsl_perm_t P)
 Randomize a permutation.
gdsl_element_tgdsl_perm_apply_on_array (gdsl_element_t *V, const gdsl_perm_t P)
 Apply a permutation on to a vector.
void gdsl_perm_write (const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)
 Write the elements of a permutation to a file.
void gdsl_perm_write_xml (const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)
 Write the elements of a permutation to a file into XML.
void gdsl_perm_dump (const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)
 Dump the internal structure of a permutation to a file.