Typedefs | |
typedef gdsl_perm * | gdsl_perm_t |
GDSL permutation type. | |
typedef void(* | gdsl_perm_write_func_t )(ulong E, FILE *OUTPUT_FILE, gdsl_perm_position_t POSITION, void *USER_DATA) |
GDSL permutation write function type. | |
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. | |
ulong * | gdsl_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_t * | gdsl_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_perm_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. |
|
GDSL permutation type. This type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. Definition at line 49 of file gdsl_perm.h. |
|
GDSL permutation write function type.
Definition at line 73 of file gdsl_perm.h. |
|
This type is for gdsl_perm_write_func_t.
Definition at line 54 of file gdsl_perm.h. |
|
Create a new permutation. Allocate a new permutation data structure of size N wich name is set to a copy of NAME.
|
|
Apply a permutation on to a vector.
|
|
Count the cycles number into a canonical permutation.
|
|
Convert a canonical permutation to its linear form. Convert the canonical permutation P to its linear form. The resulted linear permutation is placed into Q without modifying P.
|
|
Copy a permutation. Create and return a copy of the permutation P.
|
|
Dump the internal structure of a permutation to a file. Dump the structure of the permutation P to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F function to write P's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.
|
|
Destroy a permutation. Deallocate the permutation P.
|
|
Get the (INDIX+1)-th element from a permutation.
|
|
Get the array elements of a permutation.
|
|
Get the name of a permutation.
|
|
Get the size of a permutation.
|
|
Inverse in place a permutation.
|
|
Count the cycles number into a linear permutation.
|
|
Count the inversions number into a linear permutation.
|
|
Get the next permutation from a linear permutation. The permutation P is modified to become the next permutation after P.
|
|
Get the previous permutation from a linear permutation. The permutation P is modified to become the previous permutation before P.
|
|
Convert a linear permutation to its canonical form. Convert the linear permutation P to its canonical form. The resulted canonical permutation is placed into Q without modifying P.
|
|
Multiply two permutations. Compute the product of the permutations ALPHA x BETA and puts the result in RESULT without modifying ALPHA and BETA.
|
|
Randomize a permutation. The permutation P is randomized in an efficient way, using inversions array.
|
|
Reverse in place a permutation.
|
|
Initialize a permutation with an array of values. Initialize the permutation P with the values contained in the array of values ARRAY. If ARRAY does not design a permutation, then P is left unchanged.
|
|
Set the name of a permutation. Change the previous name of the permutation P to a copy of NEW_NAME.
|
|
Write the elements of a permutation to a file. Write the elements of the permuation P to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.
|
|
Write the elements of a permutation to a file into XML. Write the elements of the permutation P to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F function to write P's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.
|