📄 _gdsl_bintree.3
字号:
T must be a non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to use. .RE.PP\fBReturns:\fP.RS 4the right sub-tree reference of the low-level binary tree T. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_get_left_ref()\fP .RE.PP.SS "\fBulong\fP _gdsl_bintree_get_height (const \fB_gdsl_bintree_t\fP T)".PPGet the height of a low-level binary tree. .PPCompute the height of the low-level binary tree T (noted h(T))..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to use. .RE.PP\fBReturns:\fP.RS 4the height of T. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_get_size()\fP .RE.PP.SS "\fBulong\fP _gdsl_bintree_get_size (const \fB_gdsl_bintree_t\fP T)".PPGet the size of a low-level binary tree. .PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to use. .RE.PP\fBReturns:\fP.RS 4the number of elements of T (noted |T|). .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_get_height()\fP .RE.PP.SS "void _gdsl_bintree_set_content (\fB_gdsl_bintree_t\fP T, const \fBgdsl_element_t\fP E)".PPSet the root element of a low-level binary tree. .PPModify the root element of the low-level binary tree T to E..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T must be a non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to modify. .br\fIE\fP The new T's root content. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_get_content\fP .RE.PP.SS "void _gdsl_bintree_set_parent (\fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_t\fP P)".PPSet the parent tree of a low-level binary tree. .PPModify the parent of the low-level binary tree T to P..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T must be a non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to modify. .br\fIP\fP The new T's parent. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_get_parent()\fP .RE.PP.SS "void _gdsl_bintree_set_left (\fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_t\fP L)".PPSet left sub-tree of a low-level binary tree. .PPModify the left sub-tree of the low-level binary tree T to L..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T must be a non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to modify. .br\fIL\fP The new T's left sub-tree. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_set_right()\fP .PP\fB_gdsl_bintree_get_left()\fP .PP\fB_gdsl_bintree_get_right()\fP .RE.PP.SS "void _gdsl_bintree_set_right (\fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_t\fP R)".PPSet right sub-tree of a low-level binary tree. .PPModify the right sub-tree of the low-level binary tree T to R..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T must be a non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to modify. .br\fIR\fP The new T's right sub-tree. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_set_left()\fP .PP\fB_gdsl_bintree_get_left()\fP .PP\fB_gdsl_bintree_get_right()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_rotate_left (\fB_gdsl_bintree_t\fP * T)".PPLeft rotate a low-level binary tree. .PPDo a left rotation of the low-level binary tree T..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T & r(T) must be non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to rotate. .RE.PP\fBReturns:\fP.RS 4the modified T left-rotated. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_rotate_right()\fP .PP\fB_gdsl_bintree_rotate_left_right()\fP .PP\fB_gdsl_bintree_rotate_right_left()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_rotate_right (\fB_gdsl_bintree_t\fP * T)".PPRight rotate a low-level binary tree. .PPDo a right rotation of the low-level binary tree T..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T & l(T) must be non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to rotate. .RE.PP\fBReturns:\fP.RS 4the modified T right-rotated. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_rotate_left()\fP .PP\fB_gdsl_bintree_rotate_left_right()\fP .PP\fB_gdsl_bintree_rotate_right_left()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_rotate_left_right (\fB_gdsl_bintree_t\fP * T)".PPLeft-right rotate a low-level binary tree. .PPDo a double left-right rotation of the low-level binary tree T..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T & l(T) & r(l(T)) must be non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to rotate. .RE.PP\fBReturns:\fP.RS 4the modified T left-right-rotated. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_rotate_left()\fP .PP\fB_gdsl_bintree_rotate_right()\fP .PP\fB_gdsl_bintree_rotate_right_left()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_rotate_right_left (\fB_gdsl_bintree_t\fP * T)".PPRight-left rotate a low-level binary tree. .PPDo a double right-left rotation of the low-level binary tree T..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4T & r(T) & l(r(T)) must be non-empty _gdsl_bintree_t. .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to rotate. .RE.PP\fBReturns:\fP.RS 4the modified T right-left-rotated. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_rotate_left()\fP .PP\fB_gdsl_bintree_rotate_right()\fP .PP\fB_gdsl_bintree_rotate_left_right()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_map_prefix (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_map_func_t\fP MAP_F, void * USER_DATA)".PPParse a low-level binary tree in prefixed order. .PPParse all nodes of the low-level binary tree T in prefixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then \fB_gdsl_bintree_map_prefix()\fP stops and returns its last examinated node..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4MAP_F != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to map. .br\fIMAP_F\fP The map function. .br\fIUSER_DATA\fP User's datas. .RE.PP\fBReturns:\fP.RS 4the first node for which MAP_F returns GDSL_MAP_STOP. .PPNULL when the parsing is done. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_map_infix()\fP .PP\fB_gdsl_bintree_map_postfix()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_map_infix (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_map_func_t\fP MAP_F, void * USER_DATA)".PPParse a low-level binary tree in infixed order. .PPParse all nodes of the low-level binary tree T in infixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then \fB_gdsl_bintree_map_infix()\fP stops and returns its last examinated node..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4MAP_F != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to map. .br\fIMAP_F\fP The map function. .br\fIUSER_DATA\fP User's datas. .RE.PP\fBReturns:\fP.RS 4the first node for which MAP_F returns GDSL_MAP_STOP. .PPNULL when the parsing is done. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_map_prefix()\fP .PP\fB_gdsl_bintree_map_postfix()\fP .RE.PP.SS "\fB_gdsl_bintree_t\fP _gdsl_bintree_map_postfix (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_map_func_t\fP MAP_F, void * USER_DATA)".PPParse a low-level binary tree in postfixed order. .PPParse all nodes of the low-level binary tree T in postfixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then \fB_gdsl_bintree_map_postfix()\fP stops and returns its last examinated node..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4MAP_F != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to map. .br\fIMAP_F\fP The map function. .br\fIUSER_DATA\fP User's datas. .RE.PP\fBReturns:\fP.RS 4the first node for which MAP_F returns GDSL_MAP_STOP. .PPNULL when the parsing is done. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_map_prefix()\fP .PP\fB_gdsl_bintree_map_infix()\fP .RE.PP.SS "void _gdsl_bintree_write (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite the content of all nodes of a low-level binary tree to a file. .PPWrite the nodes contents of the low-level binary tree T to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4WRITE_F != NULL & OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write T's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_write_xml()\fP .PP\fB_gdsl_bintree_dump()\fP .RE.PP.SS "void _gdsl_bintree_write_xml (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite the content of a low-level binary tree to a file into XML. .PPWrite the nodes contents of the low-level binary tree T to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F function to write T's nodes content to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write T's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_write()\fP .PP\fB_gdsl_bintree_dump()\fP .RE.PP.SS "void _gdsl_bintree_dump (const \fB_gdsl_bintree_t\fP T, const \fB_gdsl_bintree_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPDump the internal structure of a low-level binary tree to a file. .PPDump the structure of the low-level binary tree T to OUTPUT_FILE. If WRITE_F != NULL, then use WRITE_F function to write T's nodes contents to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |T| ) .RE.PP\fBPrecondition:\fP.RS 4OUTPUT_FILE != NULL .RE.PP\fBParameters:\fP.RS 4\fIT\fP The low-level binary tree to dump. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write T's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_bintree_write()\fP .PP\fB_gdsl_bintree_write_xml()\fP .RE.PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -