Typedefs | |
typedef _gdsl_bintree * | _gdsl_bintree_t |
GDSL low-level binary tree type. | |
typedef int(* | gdsl_bintree_map_func_t )(_gdsl_bintree_t TREE, void *USER_DATA) |
GDSL low-level binary tree map function type. | |
Functions | |
_gdsl_bintree_t | _gdsl_bintree_alloc (const gdsl_element_t E, const _gdsl_bintree_t LEFT, const _gdsl_bintree_t RIGHT) |
Create a new low-level binary tree. | |
void | _gdsl_bintree_free (_gdsl_bintree_t T, const gdsl_free_func_t FREE_F) |
Destroy a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_copy (const _gdsl_bintree_t T, const gdsl_copy_func_t COPY_F) |
Copy a low-level binary tree. | |
bool | _gdsl_bintree_is_empty (const _gdsl_bintree_t T) |
Check if a low-level binary tree is empty. | |
bool | _gdsl_bintree_is_leaf (const _gdsl_bintree_t T) |
Check if a low-level binary tree is reduced to a leaf. | |
bool | _gdsl_bintree_is_root (const _gdsl_bintree_t T) |
Check if a low-level binary tree is a root. | |
gdsl_element_t | _gdsl_bintree_get_content (const _gdsl_bintree_t T) |
Get the root content of a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_get_parent (const _gdsl_bintree_t T) |
Get the parent tree of a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_get_left (const _gdsl_bintree_t T) |
Get the left sub-tree of a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_get_right (const _gdsl_bintree_t T) |
Get the right sub-tree of a low-level binary tree. | |
_gdsl_bintree_t * | _gdsl_bintree_get_left_ref (const _gdsl_bintree_t T) |
Get the left sub-tree reference of a low-level binary tree. | |
_gdsl_bintree_t * | _gdsl_bintree_get_right_ref (const _gdsl_bintree_t T) |
Get the right sub-tree reference of a low-level binary tree. | |
ulong | _gdsl_bintree_get_height (const _gdsl_bintree_t T) |
Get the height of a low-level binary tree. | |
ulong | _gdsl_bintree_get_size (const _gdsl_bintree_t T) |
Get the size of a low-level binary tree. | |
void | _gdsl_bintree_set_content (_gdsl_bintree_t T, const gdsl_element_t E) |
Set the root element of a low-level binary tree. | |
void | _gdsl_bintree_set_parent (_gdsl_bintree_t T, const _gdsl_bintree_t P) |
Set the parent tree of a low-level binary tree. | |
void | _gdsl_bintree_set_left (_gdsl_bintree_t T, const _gdsl_bintree_t L) |
Set left sub-tree of a low-level binary tree. | |
void | _gdsl_bintree_set_right (_gdsl_bintree_t T, const _gdsl_bintree_t R) |
Set right sub-tree of a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_rotate_left (_gdsl_bintree_t *T) |
Left rotate a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_rotate_right (_gdsl_bintree_t *T) |
Right rotate a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_rotate_left_right (_gdsl_bintree_t *T) |
Left-right rotate a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_rotate_right_left (_gdsl_bintree_t *T) |
Right-left rotate a low-level binary tree. | |
_gdsl_bintree_t | _gdsl_bintree_map_prefix (const _gdsl_bintree_t T, const gdsl_bintree_map_func_t MAP_F, void *USER_DATA) |
Parse a low-level binary tree in prefixed order. | |
_gdsl_bintree_t | _gdsl_bintree_map_infix (const _gdsl_bintree_t T, const gdsl_bintree_map_func_t MAP_F, void *USER_DATA) |
Parse a low-level binary tree in infixed order. | |
_gdsl_bintree_t | _gdsl_bintree_map_postfix (const _gdsl_bintree_t T, const gdsl_bintree_map_func_t MAP_F, void *USER_DATA) |
Parse a low-level binary tree in postfixed order. | |
void | _gdsl_bintree_write (const _gdsl_bintree_t T, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Write the content of all nodes of a low-level binary tree to a file. | |
void | _gdsl_bintree_write_xml (const _gdsl_bintree_t T, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Write the content of a low-level binary tree to a file into XML. | |
void | _gdsl_bintree_dump (const _gdsl_bintree_t T, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Dump the internal structure of a low-level binary tree to a file. |
|
GDSL low-level binary tree 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 53 of file _gdsl_bintree.h. |
|
GDSL low-level binary tree map function type.
Definition at line 61 of file _gdsl_bintree.h. |
|
Create a new low-level binary tree. Allocate a new low-level binary tree data structure. Its root content is set to E and its left son (resp. right) is set to LEFT (resp. RIGHT).
|
|
Copy a low-level binary tree. Create and return a copy of the low-level binary tree T using COPY_F on each T's element to copy them.
|
|
Dump the internal structure of a low-level binary tree to a file. Dump 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.
|
|
Destroy a low-level binary tree. Flush and destroy the low-level binary tree T. If FREE_F != NULL, FREE_F function is used to deallocate each T's element. Otherwise nothing is done with T's elements.
|
|
Get the root content of a low-level binary tree.
|
|
Get the height of a low-level binary tree. Compute the height of the low-level binary tree T (noted h(T)).
|
|
Get the left sub-tree of a low-level binary tree. Return the left subtree of the low-level binary tree T (noted l(T)).
|
|
Get the left sub-tree reference of a low-level binary tree.
|
|
Get the parent tree of a low-level binary tree.
|
|
Get the right sub-tree of a low-level binary tree. Return the right subtree of the low-level binary tree T (noted r(T)).
|
|
Get the right sub-tree reference of a low-level binary tree.
|
|
Get the size of a low-level binary tree.
|
|
Check if a low-level binary tree is empty.
|
|
Check if a low-level binary tree is reduced to a leaf.
|
|
Check if a low-level binary tree is a root.
|
|
Parse a low-level binary tree in infixed order. Parse 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 _gdsl_bintree_map_infix() stops and returns its last examinated node.
|
|
Parse a low-level binary tree in postfixed order. Parse 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 _gdsl_bintree_map_postfix() stops and returns its last examinated node.
|
|
Parse a low-level binary tree in prefixed order. Parse 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 _gdsl_bintree_map_prefix() stops and returns its last examinated node.
|
|
Left rotate a low-level binary tree. Do a left rotation of the low-level binary tree T.
|
|
Left-right rotate a low-level binary tree. Do a double left-right rotation of the low-level binary tree T.
|
|
Right rotate a low-level binary tree. Do a right rotation of the low-level binary tree T.
|
|
Right-left rotate a low-level binary tree. Do a double right-left rotation of the low-level binary tree T.
|
|
Set the root element of a low-level binary tree. Modify the root element of the low-level binary tree T to E.
|
|
Set left sub-tree of a low-level binary tree. Modify the left sub-tree of the low-level binary tree T to L.
|
|
Set the parent tree of a low-level binary tree. Modify the parent of the low-level binary tree T to P.
|
|
Set right sub-tree of a low-level binary tree. Modify the right sub-tree of the low-level binary tree T to R.
|
|
Write the content of all nodes of a low-level binary tree to a file. Write 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.
|
|
Write the content of a low-level binary tree to a file into XML. Write 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.
|