📄 gdsl_perm.3
字号:
P must be a valid canonical gdsl_perm_t .RE.PP\fBParameters:\fP.RS 4\fIP\fP The canonical permutation to use. .RE.PP\fBReturns:\fP.RS 4the number of cycles into the canonical permutation P. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_linear_cycles_count()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_set_name (\fBgdsl_perm_t\fP P, const char * NEW_NAME)".PPSet the name of a permutation. .PPChange the previous name of the permutation P to a copy of NEW_NAME..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to change the name .br\fINEW_NAME\fP The new name of P .RE.PP\fBReturns:\fP.RS 4the modified permutation in case of success. .PPNULL in case of insufficient memory. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_get_name()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_linear_next (\fBgdsl_perm_t\fP P)".PPGet the next permutation from a linear permutation. .PPThe permutation P is modified to become the next permutation after P..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid linear gdsl_perm_t & |P| > 1 .RE.PP\fBParameters:\fP.RS 4\fIP\fP The linear permutation to modify .RE.PP\fBReturns:\fP.RS 4the next permutation after the permutation P. .PPNULL if P is already the last permutation. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_linear_prev()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_linear_prev (\fBgdsl_perm_t\fP P)".PPGet the previous permutation from a linear permutation. .PPThe permutation P is modified to become the previous permutation before P..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid linear gdsl_perm_t & |P| >= 2 .RE.PP\fBParameters:\fP.RS 4\fIP\fP The linear permutation to modify .RE.PP\fBReturns:\fP.RS 4the previous permutation before the permutation P. .PPNULL if P is already the first permutation. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_linear_next()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_set_elements_array (\fBgdsl_perm_t\fP P, const \fBulong\fP * ARRAY)".PPInitialize a permutation with an array of values. .PPInitialize 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..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t & V != NULL & |V| == |P| .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to initialize .br\fIARRAY\fP The array of values to initialize P .RE.PP\fBReturns:\fP.RS 4the modified permutation in case of success. .PPNULL in case V does not design a valid permutation. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_get_elements_array()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_multiply (\fBgdsl_perm_t\fP RESULT, const \fBgdsl_perm_t\fP ALPHA, const \fBgdsl_perm_t\fP BETA)".PPMultiply two permutations. .PPCompute the product of the permutations ALPHA x BETA and puts the result in RESULT without modifying ALPHA and BETA..PP\fBNote:\fP.RS 4Complexity: O( |RESULT| ) .RE.PP\fBPrecondition:\fP.RS 4RESULT, ALPHA and BETA must be valids gdsl_perm_t & |RESULT| == |ALPHA| == |BETA| .RE.PP\fBParameters:\fP.RS 4\fIRESULT\fP The result of the product ALPHA x BETA .br\fIALPHA\fP The first permutation used in the product .br\fIBETA\fP The second permutation used in the product .RE.PP\fBReturns:\fP.RS 4RESULT, the result of the multiplication of the permutations A and B. .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_linear_to_canonical (\fBgdsl_perm_t\fP Q, const \fBgdsl_perm_t\fP P)".PPConvert a linear permutation to its canonical form. .PPConvert the linear permutation P to its canonical form. The resulted canonical permutation is placed into Q without modifying P..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P & Q must be valids gdsl_perm_t & |P| == |Q| & P != Q .RE.PP\fBParameters:\fP.RS 4\fIQ\fP The canonical form of P .br\fIP\fP The linear permutation used to compute its canonical form into Q .RE.PP\fBReturns:\fP.RS 4the canonical form Q of the permutation P. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_canonical_to_linear()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_canonical_to_linear (\fBgdsl_perm_t\fP Q, const \fBgdsl_perm_t\fP P)".PPConvert a canonical permutation to its linear form. .PPConvert the canonical permutation P to its linear form. The resulted linear permutation is placed into Q without modifying P..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P & Q must be valids gdsl_perm_t & |P| == |Q| & P != Q .RE.PP\fBParameters:\fP.RS 4\fIQ\fP The linear form of P .br\fIP\fP The canonical permutation used to compute its linear form into Q .RE.PP\fBReturns:\fP.RS 4the linear form Q of the permutation P. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_linear_to_canonical()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_inverse (\fBgdsl_perm_t\fP P)".PPInverse in place a permutation. .PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to invert .RE.PP\fBReturns:\fP.RS 4the inverse permutation of P in case of success. .PPNULL in case of insufficient memory. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_reverse()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_reverse (\fBgdsl_perm_t\fP P)".PPReverse in place a permutation. .PP\fBNote:\fP.RS 4Complexity: O( |P| / 2 ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to reverse .RE.PP\fBReturns:\fP.RS 4the mirror image of the permutation P .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_inverse()\fP .RE.PP.SS "\fBgdsl_perm_t\fP gdsl_perm_randomize (\fBgdsl_perm_t\fP P)".PPRandomize a permutation. .PPThe permutation P is randomized in an efficient way, using inversions array..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to randomize .RE.PP\fBReturns:\fP.RS 4the mirror image ~P of the permutation of P in case of success. .PPNULL in case of insufficient memory. .RE.PP.SS "\fBgdsl_element_t\fP* gdsl_perm_apply_on_array (\fBgdsl_element_t\fP * V, const \fBgdsl_perm_t\fP P)".PPApply a permutation on to a vector. .PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t & |P| == |V| .RE.PP\fBParameters:\fP.RS 4\fIV\fP The vector/array to reorder according to P .br\fIP\fP The permutation to use to reorder V .RE.PP\fBReturns:\fP.RS 4the reordered array V according to the permutation P in case of success. .PPNULL in case of insufficient memory. .RE.PP.SS "void gdsl_perm_write (const \fBgdsl_perm_t\fP P, const \fBgdsl_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite the elements of a permutation to a file. .PPWrite the elements of the permuation P to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t & WRITE_F != NULL & OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write P's elements. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_write_xml()\fP .PP\fBgdsl_perm_dump()\fP .RE.PP.SS "void gdsl_perm_write_xml (const \fBgdsl_perm_t\fP P, const \fBgdsl_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite the elements of a permutation to a file into XML. .PPWrite 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..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t & OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write P's elements. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_write()\fP .PP\fBgdsl_perm_dump()\fP .RE.PP.SS "void gdsl_perm_dump (const \fBgdsl_perm_t\fP P, const \fBgdsl_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPDump the internal structure of a permutation to a file. .PPDump 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..PP\fBNote:\fP.RS 4Complexity: O( |P| ) .RE.PP\fBPrecondition:\fP.RS 4P must be a valid gdsl_perm_t & OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIP\fP The permutation to dump. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write P's elements. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fBgdsl_perm_write()\fP .PP\fBgdsl_perm_write_xml()\fP .RE.PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -