arbregen module).
More...Data Structures | |
| struct | TreeSpecies |
| Tree species. More... | |
Typedefs | |
| typedef unsigned long | TreeMemPos |
| Tree node index. | |
| typedef unsigned char | TreeNode |
| Tree node. | |
| typedef TreeNode * | Tree |
| Tree data structure. | |
Enumerations | |
| enum | TreeFormat { COMPRESSED_TREE, GROWING_TREE } |
| Tree format. More... | |
Functions | |
| void | treeExplore (const Tree *tree, const TreeSpecies *species, LongStack *node_stack) |
| void | treeDump (const Tree *tree, const TreeSpecies *species, int(*print_function)(const char *,...)) |
| TreeMemPos | treeNodeGetNextSiblingOffset (const TreeNode *node, const TreeSpecies *useless) |
| TreeMemPos | treeNodeGetNextChildOffset (const TreeNode *node, const TreeSpecies *useless) |
| Tree | treeCreate (TreeSpecies *species) |
| void | treeFree (Tree *tree, TreeSpecies *species) |
| TreeMemPos | treeAddSibling (Tree *main_tree, TreeSpecies *species, const TreeMemPos sibling_index, const Tree *sub_tree, const size_t sub_tree_size) |
| TreeMemPos | treeNodeDecodeSiblingOffset (const TreeNode *node) |
| void | treeNodeCodeSiblingOffset (TreeNode *node, const TreeMemPos sibling_offset) |
| int | treeSave (const Tree *tree, const TreeSpecies *species, const char *filename) |
| int | treeSaveFile (const Tree *tree, const TreeSpecies *species, FILE *file) |
| int | treeLoad (Tree *tree, TreeSpecies *species, const char *filename) |
| int | treeLoadFile (Tree *tree, TreeSpecies *species, FILE *file) |
| TreeMemPos | treeNodeCodeULong (TreeNode *node, const unsigned long value_to_code, const unsigned char mask) |
| unsigned long | treeNodeDecodeULong (const TreeNode *node) |
| char | treeNodeDecodeChar (const TreeNode *node) |
arbregen module).
SlpTK Library 0.6.0
<generictree.h> Antonin Merçay (revision on 23.11.2004)
| typedef unsigned long TreeMemPos |
| enum TreeFormat |
| TreeMemPos treeAddSibling | ( | Tree * | main_tree, | |
| TreeSpecies * | species, | |||
| const TreeMemPos | sibling_index, | |||
| const Tree * | sub_tree, | |||
| const size_t | sub_tree_size | |||
| ) |
Insert a ?FILAIRE? subtree as a sibling of a tree node
| main_tree | The tree where to add | |
| species | The species of the tree | |
| sibling_index | The tree node index of the sibling to add | |
| sub_tree | The copy of the sub tree to add | |
| sub_tree_size | The size of the sub tree to add |
Greffe_Frere | Tree treeCreate | ( | TreeSpecies * | species | ) |
Create a new tree of a given species
| [in] | species | The species of the tree to create |
Alloue_Arbre | void treeDump | ( | const Tree * | tree, | |
| const TreeSpecies * | species, | |||
| int(*)(const char *,...) | print_function | |||
| ) |
Dump the contents of a tree using bracketed format
| [in] | tree | The tree to explore |
| [in] | species | The tree species |
| [in] | print_function | The print function to use |
Affiche_Arbre_Simple | void treeExplore | ( | const Tree * | tree, | |
| const TreeSpecies * | species, | |||
| LongStack * | node_stack | |||
| ) |
Perform a depth-first traversal step of a growing tree
| [in] | tree | The tree to explore |
| [in] | species | The tree species |
| [out] | node_stack | A stack where to store the tree node index |
Parcours_Arbre_Simple | void treeFree | ( | Tree * | tree, | |
| TreeSpecies * | species | |||
| ) |
Free the memory allocated to a tree
| [in] | tree | The tree |
| [in] | species | The species of the tree |
Libere_Arbre | int treeLoad | ( | Tree * | tree, | |
| TreeSpecies * | species, | |||
| const char * | filename | |||
| ) |
Load a tree and its species from a binary file
| [out] | tree | The tree to load |
| [out] | species | The species of the tree |
| [in] | filename | The name of the input file |
Read_Arbre | int treeLoadFile | ( | Tree * | tree, | |
| TreeSpecies * | species, | |||
| FILE * | file | |||
| ) |
Load a tree and its species directly from a binary file
| tree | The tree where to load | |
| species | The species of the tree | |
| file | The source binary file |
Fichier_Read_Arbre | void treeNodeCodeSiblingOffset | ( | TreeNode * | node, | |
| const TreeMemPos | sibling_offset | |||
| ) |
Code the offset to a sibling from a tree node
| [in] | node | The tree node address where to code |
| [in] | sibling_offset | The offset to the sibling value |
Put_Dep_Frere | TreeMemPos treeNodeCodeULong | ( | TreeNode * | node, | |
| const unsigned long | value_to_code, | |||
| const unsigned char | mask | |||
| ) |
Code (with overflow bit) an unsigned long value in a node
| [in] | node | The address where to start the coding |
| [in] | value_to_code | The value to code |
| [in] | mask | ? |
Code_Ulong_BdD | char treeNodeDecodeChar | ( | const TreeNode * | node | ) |
Return the char value coded (with overflow bit) in a node
| [in] | node | The address of the node to decode |
Decode_Char (former arbrelex module) | TreeMemPos treeNodeDecodeSiblingOffset | ( | const TreeNode * | node | ) |
Decode the offset to a sibling from a tree node
| [in] | node | The tree node address to decode |
Get_Dep_Frere | unsigned long treeNodeDecodeULong | ( | const TreeNode * | node | ) |
Return the unsigned long value coded (with overflow bit) in a node
| [in] | node | The address of the node to decode |
Decode_Ulong_BdD | TreeMemPos treeNodeGetNextChildOffset | ( | const TreeNode * | node, | |
| const TreeSpecies * | useless | |||
| ) |
Return the address offset to the next node (the child initially) of a growing tree node
| [in] | node | The address of the node to treat |
| useless | Parameter not used |
Next_Noeud_Simple | TreeMemPos treeNodeGetNextSiblingOffset | ( | const TreeNode * | node, | |
| const TreeSpecies * | useless | |||
| ) |
Return the address offset to the next sibling of a growing tree node
| [in] | node | The address of the node to treat |
| useless | Parameter not used |
Next_Frere_Simple | int treeSave | ( | const Tree * | tree, | |
| const TreeSpecies * | species, | |||
| const char * | filename | |||
| ) |
Save a tree and its species in a binary file
| [in] | tree | The tree to save |
| [in] | species | The species of the tree |
| [in] | filename | The name of the output file |
Write_Arbre | int treeSaveFile | ( | const Tree * | tree, | |
| const TreeSpecies * | species, | |||
| FILE * | file | |||
| ) |
Save a tree and its species directly in a binary file
| tree | The tree to write in file | |
| species | The species of the tree | |
| file | The file where to write |
Fichier_Write_Arbre
1.4.7